Module bumpallocator

Module bumpallocator 

Source
Expand description

Bump pointer allocator

Structsยง

BumpAllocator
A bump pointer allocator. It keeps a thread local allocation buffer, and bumps a cursor to allocate from the buffer.
BumpPointer
A common fast-path bump-pointer allocator shared across different allocator implementations that use bump-pointer allocation. A BumpPointer is always initialized with cursor = 0, limit = 0, so the first allocation always fails the check of cursor + size < limit and goes to the slowpath. A binding can also take advantage of this design to zero-initialize the a bump pointer.

Constantsยง

BLOCK_MASK ๐Ÿ”’
BLOCK_SIZE ๐Ÿ”’
Size of a bump allocator block. Currently it is set to 32 KB.