A linked list memory allocator.
This allocator allows configuring the amount of smallbins and alignment sub-bins that it uses. For more information about this value, read the crate’s top level documentation.
Creates an empty heap allocator without any heap memory region, which will always return null on allocation requests.
To intiialize this allocator, use the
Checks if the heap memory region was already initialized by calling
Initializes the heap allocator with the given memory region.
If the allocator was already initialized, this function will panic.
Allocator on which this was called must not be moved, and its
address in memory must not change, otherwise undefined behaviour
will occur. This is because the heap region now contains pointers to
fields of this struct, and if this struct will move, the address of
its fields will change, and those pointers will now be invalid.
The provided memory region must be valid and non-null, and must not be used by anything else.
If after aligning the start and end addresses, the size of the heap is 0, the function panics.
Resizes an allocation previously returned from
The alignment of the content will stay the same.
Returns the argument unchanged.