Class DramArena

class DramArena : public Arena

A naive allocator which calls malloc and maintains a list of allocate pointers for freeing. For development and testing only, where folly is not available. Not for production use.

Public Functions

DramArena(size_t min_block_size = 1ULL << 32, size_t size_limit = 0)
~DramArena()
void *allocate(size_t num_bytes)
void *allocateAndZero(const size_t size)
size_t bytesUsed() const
MemoryType getMemoryType() const

Private Members

size_t size_limit_
size_t size_
SysAllocator<void> allocator_
std::vector<std::pair<void *, size_t>> allocations_