xo-alloc2: ++ documentation + threshold size for THP feature

This commit is contained in:
Roland Conybeare 2025-12-23 21:06:38 -05:00
commit 289751d3fd
18 changed files with 642 additions and 192 deletions

View file

@ -3,8 +3,15 @@
AAllocator Reference
====================
Abstract interface facet for arena allocator.
Provides simple arena allocation.
Abstract interface facet for an allocator.
Base class for runtime polymorphism over allocator implementations,
using faceted object model.
* runtime size consists of vtable pointer only.
* per FOMO prinicples, runtime state is stored separately.
Classes that inherit ``AAllocator`` will not add state
Context
-------
@ -12,40 +19,24 @@ Context
.. ditaa::
:--scale: 0.99
+-------------------------------+--------------------------------------+
| | IAllocator_DX1Collector |
| | IAllocIterator_DX1CollectorIterator |
| IAllocator_DArena | |
| IAllocIterator_DArenaIterator +--------------------------------------+
| | DX1Collector |
| | DX1CollectorIterator |
| | |
+-------------------------------+---------+----------------------------+
| DArena | |
| DArenaIterator | |
+-----------------------------------------+ CollectorConfig |
| ArenaConfig | |
+-----------------------------------------+----------------------------+
+----------------------------------+-----------------------------------+
| RAllocator | RAllocIterator |
+----------------------------------+-----------------------------------+
| IAllocator_DX1Collector | IAllocIterator_DX1Collector |
| IAllocator_DArena | IAllocIterator_DArena |
+----------------------------------+-----------------------------------+
| IAllocator_Xfer | IAllocIterator_Xfer |
| IAllocator_Any | IAllocIterator_Any |
+----------------------------------+-----------------------------------+
| AAllocator | AAllocIterator |
+----------------------------------+-----------------------------------+
+---------------+------------------+----------------------+------------+
| | | AllocInfo | |
| generation | +----------------------+ |
| object_age | AllocError | AllocHeaderConfig | cmpresult |
| role | +----------------------+ |
| | | AllocHeader | |
+---------------+------------------+----------------------+------------+
+----------------------+-------------------------+-----------------------------------+
| RAllocator | RAllocIterator | IAllocator_DArena |
| | | IAllocIterator_DArenaIterator |
+----------------------+-------------------------+-----------------------------------+
| IAllocator_Xfer | IAllocIterator_Xfer | DArena |
| IAllocator_Any | IAllocIterator_Any | DArenaIterator |
| IAllocator_Impltype | IAllocIterator_Impltype | |
| | | |
+----------------------+-------------------------+-----------------------------------+
|cBLU AAllocator | AAllocIterator | ArenaConfig |
+----------------------+-------------------------+-----------------------------------+
+-----------------+----------------------------------------------+-------------------+
| | AllocInfo | |
| +----------------------------------------------+ |
| AllocError | AllocHeaderConfig | cmpresult |
| +----------------------------------------------+ |
| | AllocHeader | |
+-----------------+----------------------------------------------+-------------------+
.. code-block:: cpp