![]() |
TrinityCore
|
#include <MemoryManager.h>
Public Types | |
| typedef shared_ptr< class MemoryManager > | Ref |
Public Member Functions | |
| virtual void * | alloc (size_t s) |
| virtual void | free (void *ptr) |
| virtual bool | isThreadsafe () const |
Public Member Functions inherited from G3D::ReferenceCountedObject | |
| virtual | ~ReferenceCountedObject () |
Static Public Member Functions | |
| static MemoryManager::Ref | create () |
Protected Member Functions | |
| MemoryManager () | |
Abstraction of memory management. Default implementation uses G3D::System::malloc and is threadsafe.
| typedef shared_ptr<class MemoryManager> G3D::MemoryManager::Ref |
|
virtual |
Return a pointer to s bytes of memory that are unused by the rest of the program. The contents of the memory are undefined
Reimplemented in G3D::CRTMemoryManager, G3D::AreaMemoryManager, and G3D::AlignedMemoryManager.
Here is the call graph for this function:
|
static |
Return the instance. There's only one instance of the default MemoryManager; it is cached after the first creation.
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Invoke to declare that this memory will no longer be used by the program. The memory manager is not required to actually reuse or release this memory.
Reimplemented in G3D::CRTMemoryManager, G3D::AreaMemoryManager, and G3D::AlignedMemoryManager.
Here is the call graph for this function:
|
virtual |
Returns true if this memory manager is threadsafe (i.e., alloc and free can be called asychronously)
Reimplemented in G3D::CRTMemoryManager, G3D::AreaMemoryManager, and G3D::AlignedMemoryManager.
1.8.8