void* allocInHead(size_t bytes) { void* p = _head->data + _head->size; _head->size += round_size_up(bytes); return p; }
virtual void* alloc(size_t bytes) { if (_size + bytes > CAPACITY) return NULL; void* p = &_buffer[_size]; _size += round_size_up(bytes); return p; }
void alignNextAlloc() { _size = round_size_up(_size); }