Memory

Arena

Arena - A bump allocator that keeps allocations stable until the arena is destroyed.
Members: Arena, ~Arena, allocate, allocateArray

allocate

allocate - Allocates a block of dynamic memory to hold the given value, moves the value into the memory block, and returns a pointer to it. The block can be freed by passing the returned pointer to a call to deallocate.

safeAllocate - Allocates a block of dynamic memory to hold the given value, moves the value into the memory block, and returns a pointer to it. The block can be freed by passing the returned pointer to a call to deallocate.

allocateArray - Allocates a block of dynamic memory to hold an array with the given element type and size, and returns a pointer to the array. The elements of the array are uninitialized. The block can be freed by passing the returned pointer to a call to deallocate.

safeAllocateArray - Allocates a block of dynamic memory to hold an array with the given element type and size, and returns a pointer to the array. The elements of the array are uninitialized. The block can be freed by passing the returned pointer to a call to deallocate.

deallocate - Deallocates a block of dynamic memory that was previously allocated by a call to allocate, allocateArray, safeAllocate, or safeAllocateArray. If the argument is null, no operation is performed.