DArena
Native arena allocator
Context
#include <xo/alloc2/DArena.hpp>
Arena memory layout
<------------------------reserved-------------------------->
<------------committed-----------><-------uncommitted------>
<--allocated--><----available---->
XXXXXXXXXXXXXXX___________________..........................
^ ^ ^ ^
lo free limit hi
[X] allocated: in use
[_] committed: physical memory obtained
[.] uncommitted: mapped in virtual memory, not backed by memory
Representation for a single allocation
free_(pre)
v
<-------------z1--------------->
< guard >< hz >< req_z >< dz >< guard >
used <== +++++++++0000zzzz@@@@@@@@@@@@@@@@@ppppppp+++++++++ ==> avail
^ ^ ^
header mem |
^ |
last_header_ free_(post)
[+] guard surrounding each allocation, for simple sanitize checks
[0] unused header bits (available for application metadata)
[z] record allocation size
[@] new allocated memory
[p] padding (to uintptr_t alignment)
Class
Warning
doxygenclass: Cannot find class “xo::mm::DArena” in doxygen xml output for project “xodoxxml” from directory: /build/xo-alloc2/build/docs/dox/xml
Member Variables
Warning
doxygengroup: Cannot find group “mm-arena-instance-vars” in doxygen xml output for project “xodoxxml” from directory: /build/xo-alloc2/build/docs/dox/xml
Type Traits
Warning
doxygengroup: Cannot find group “mm-arena-traits” in doxygen xml output for project “xodoxxml” from directory: /build/xo-alloc2/build/docs/dox/xml
Constructors
Warning
doxygengroup: Cannot find group “mm-arena-ctors” in doxygen xml output for project “xodoxxml” from directory: /build/xo-alloc2/build/docs/dox/xml
Methods
Warning
doxygengroup: Cannot find group “mm-arena-methods” in doxygen xml output for project “xodoxxml” from directory: /build/xo-alloc2/build/docs/dox/xml