5 #ifndef CVMFS_MALLOC_HEAP_H_
6 #define CVMFS_MALLOC_HEAP_H_
51 void *
Allocate(uint64_t
size,
void *header,
unsigned header_size);
52 void *
Expand(
void *block, uint64_t new_size);
65 return static_cast<double>(
stored_) / static_cast<double>(
gauge_);
88 return reinterpret_cast<Tag *
>(
89 reinterpret_cast<unsigned char *
>(
this) +
sizeof(
Tag) +
GetSize());
92 return reinterpret_cast<unsigned char *
>(
this) +
sizeof(
Tag);
126 #endif // CVMFS_MALLOC_HEAP_H_
CallbackPtr callback_ptr_
static const unsigned kMinCapacity
void * Allocate(uint64_t size, void *header, unsigned header_size)
MallocHeap(uint64_t capacity, CallbackPtr callback_ptr)
void * Expand(void *block, uint64_t new_size)
uint64_t GetSize(void *block)
Callbackable< BlockPtr >::CallbackTN * CallbackPtr
void MarkFree(void *block)
uint64_t compacted_bytes()
bool HasSpaceFor(uint64_t nbytes)
unsigned char * GetBlock()