14 #ifndef G3D_AreaMemoryManager_h
15 #define G3D_AreaMemoryManager_h
48 void*
alloc(
size_t s);
60 typedef shared_ptr<AreaMemoryManager>
Ref;
76 virtual void*
alloc(
size_t s);
79 virtual void free(
void*
x);
virtual bool isThreadsafe() const
Definition: AreaMemoryManager.cpp:40
Buffer(size_t size)
Definition: AreaMemoryManager.cpp:18
static MemoryManager::Ref create()
Definition: MemoryManager.cpp:35
shared_ptr< AreaMemoryManager > Ref
Definition: AreaMemoryManager.h:60
Dynamic 1D array tuned for performance.
Definition: Array.h:95
uint8 * m_first
Definition: AreaMemoryManager.h:37
size_t m_used
Definition: AreaMemoryManager.h:39
size_t m_size
Definition: AreaMemoryManager.h:38
Definition: MemoryManager.h:24
~Buffer()
Definition: AreaMemoryManager.cpp:24
virtual void * alloc(size_t s)
Definition: AreaMemoryManager.cpp:65
virtual void free(void *x)
Definition: AreaMemoryManager.cpp:77
~AreaMemoryManager()
Definition: AreaMemoryManager.cpp:55
size_t m_sizeHint
Definition: AreaMemoryManager.h:51
Array< Buffer * > m_bufferArray
Definition: AreaMemoryManager.h:54
void * alloc(size_t s)
Definition: AreaMemoryManager.cpp:29
size_t bytesAllocated() const
Definition: AreaMemoryManager.cpp:60
Allocates memory in large blocks and then frees it as an area.
Definition: AreaMemoryManager.h:32
uint8_t uint8
Definition: g3dmath.h:164
AreaMemoryManager CoherentAllocator
Definition: AreaMemoryManager.h:90
G3D::int16 x
Definition: Vector2int16.h:37
AreaMemoryManager(size_t sizeHint)
Definition: AreaMemoryManager.cpp:50
Definition: AreaMemoryManager.h:35
void deallocateAll()
Definition: AreaMemoryManager.cpp:82