|
JASSv2
|
Details of an individual large-allocation unit. More...
#include <allocator_pool.h>

Public Attributes | |
| std::atomic< uint8_t * > | chunk_at |
| Pointer to the next byte that can be allocated (within the current chunk). | |
| uint8_t * | chunk_end |
| Pointer to the end of the current chunk's large allocation (used to check for overflow). | |
| chunk * | next_chunk |
| Pointer to the previous large allocation (i.e. chunk). | |
| size_t | chunk_size |
| The size of this chunk. | |
| uint8_t | data [] |
| The data in this large allocation that is available for re-distribution. | |
Details of an individual large-allocation unit.
The large-allocations are kept in a linked list of chunks. Each chunk stores a backwards pointer (of NULL if not backwards chunk) the size of the allocation and details of it's use. The large block that is allocated is actually the size of the caller's request plus the size of this structure. The large-block is layed out as this object at the start and data[] being of the user's requested length. That is, if the user asks for 1KB then the actual request from the C++ free store (or the Operating System) is 1BK + sizeof(allocator::chunk).
1.8.13