Fairport
v1.0.38
|
Provides a map of the allocations on a heap block. More...
#include <disk.h>
Public Attributes | |
ushort | num_allocs |
Number of allocations on this block. | |
ushort | num_frees |
Number of empty allocations on this. | |
ushort | allocs [1] |
The offset of each allocation. |
Provides a map of the allocations on a heap block.
The page map gives the allocation location all of the heap allocations on this heap block. The allocs array contains the start of each allocation. The length of allocation N is determined simply by subtracting the start of the N+1 allocation from the start of Ns allocation. For this reason, the allocation array has N+1 entries, where the last entry gives the end of the last allocation.
When an allocation is freed, all subsequent allocations are slid down, making the freed allocation zero in length.