[][src]Module heaparray::alloc_utils

Contains pointer math and allocation utilities.

Functions

allocate

Allocate a block of memory, and then coerce it to type T

deallocate

Deallocate a block of memory using the given size and alignment information. Completely ignores the type of the input pointer, so the size and align need to be correct.

ensure_align

Ensure size is a multiple of align.

size_align

Get the size and alignment of a type in bytes

size_align_array

Returns the (size, alignment) of an array of elements with capacity T

size_align_multiple

Aligns everything and potentially slightly overestimates the amount of space necessary