|
CookMem 1.4.0
A C++ memory context / allocator
|
#include <arena.h>
Public Member Functions | |
| virtual void * | getSegment (std::size_t &size)=0 |
| virtual bool | freeSegment (void *ptr, std::size_t size)=0 |
| virtual void | releaseAll ()=0 |
An arena is used to retrieve a page of memory.
This class here is merely to define the interface needed to implement a MemArena.
Free an arena segment.
| ptr | the pointer to be freed. |
| size | the size of the pointer. |
Allocate an arena segment.
| [in,out] | size | the size of the page. This value is updated upon successful request to indicate the actual size obtained. |
Release all segments held by this arena. Segments that a memory pool is still using are not affected. An arena that keeps no segments does nothing.