12 #ifndef ROC_CORE_IARENA_H_
13 #define ROC_CORE_IARENA_H_
59 return arena.allocate(size);
66 return arena.allocate(size);
74 arena.deallocate(ptr);
82 arena.deallocate(ptr);
virtual void deallocate(void *ptr)=0
Deallocate previously allocated memory.
virtual void * allocate(size_t size)=0
Allocate memory.
void destroy_object(T &object)
Destroy object and deallocate its memory.
virtual size_t allocated_size(void *ptr) const =0
Returns how many bytes was allocated for given pointer returned by allocate(). Covers all internal ov...
virtual size_t compute_allocated_size(size_t size) const =0
Computes how many bytes will be actually allocated if allocate() is called with given size....
Commonly used types and functions.