19 #ifndef B2_BLOCK_ALLOCATOR_H
20 #define B2_BLOCK_ALLOCATOR_H
24 const int32 b2_chunkSize = 16 * 1024;
25 const int32 b2_maxBlockSize = 640;
26 const int32 b2_blockSizes = 14;
27 const int32 b2_chunkArrayIncrement = 128;
45 void Free(
void* p, int32 size);
55 b2Block* m_freeLists[b2_blockSizes];
57 static int32 s_blockSizes[b2_blockSizes];
58 static uint8 s_blockSizeLookup[b2_maxBlockSize + 1];
59 static bool s_blockSizeLookupInitialized;
void Free(void *p, int32 size)
Free memory. This will use b2Free if the size is larger than b2_maxBlockSize.
Definition: b2BlockAllocator.cpp:155
Definition: b2BlockAllocator.cpp:44
Definition: b2BlockAllocator.h:35
Definition: b2BlockAllocator.cpp:50
void * Allocate(int32 size)
Allocate memory. This will use b2Alloc if the size is larger than b2_maxBlockSize.
Definition: b2BlockAllocator.cpp:97