[#Arena] = Arena :mrdocs: An arena manages a contiguous region of memory by dividing it into chunks. == Synopsis Declared in `<support/lockedpool.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class Arena; ---- == Types [cols="1,4"] |=== | Name| Description | xref:Arena/Stats-08.adoc[`Stats`] | Memory statistics. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:Arena/2constructor-08.adoc[`Arena`] [.small]#[constructor]# | Constructors | xref:Arena/2destructor.adoc[`~Arena`] [.small]#[destructor]# [.small]#[virtual]# | Destroys the arena. | xref:Arena/operator_assign.adoc[`operator=`] [.small]#[deleted]# | Deleted copy assignment; an Arena cannot be copied. | xref:Arena/addressInArena.adoc[`addressInArena`] | Return whether a pointer points inside this arena. This returns base <= ptr < (base+size) so only use it for (inclusive) chunk starting addresses. | xref:Arena/alloc.adoc[`alloc`] | Allocate size bytes from this arena. Returns pointer on success, or 0 if memory is full or the application tried to allocate 0 bytes. | xref:Arena/free.adoc[`free`] | Free a previously allocated chunk of memory. Freeing the zero pointer has no effect. Raises std::runtime_error in case of error. | xref:Arena/stats-06.adoc[`stats`] | Get arena usage statistics |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#