예제 #1
0
 virtual void* alloc(size_t bytes) {
   alignNextAlloc();
   return canAllocInHead(bytes) ? allocInHead(bytes) : allocInNewBlock(bytes);
 }
예제 #2
0
 // Allocates the specified amount of bytes in the buffer
 virtual void* alloc(size_t bytes) {
   alignNextAlloc();
   if (!canAlloc(bytes)) return NULL;
   return doAlloc(bytes);
 }