12 #ifndef ROC_CORE_LIMITED_ARENA_H_
13 #define ROC_CORE_LIMITED_ARENA_H_
Decorator around IArena to make it memory limited.
virtual void deallocate(void *ptr)
Deallocate previously allocated memory.
virtual void * allocate(size_t size)
Allocate memory after checking with the memory limiter.
virtual size_t compute_allocated_size(size_t size) const
Computes how many bytes will be actually allocated if allocate() is called with given size....
LimitedArena(IArena &arena, MemoryLimiter &memory_limiter)
Initialize.
virtual size_t allocated_size(void *ptr) const
Returns how many bytes was allocated for given pointer returned by allocate(). Covers all internal ov...
Memory limiter. This class can be used to keep track of memory being consumed. This is done through t...
Base class for non-copyable objects.