btdu.alloc

Memory allocation

Members

Aliases

CasualAllocator
alias CasualAllocator = CheckedAllocator!Mallocator

Casual allocator which supports deallocation.

GrowAllocator
alias GrowAllocator = AllocatorList!((n) => Region!MmapAllocator(max(n, 1024 * 4096)), NullAllocator)

Allocator to use for objects with infinite lifetime, which will never be freed.

Structs

CheckedAllocator
struct CheckedAllocator(ParentAllocator, alias onFail = onOutOfMemoryError)

Wrapper allocator which calls a function when memory allocation fails. Because downstream code doesn't check for nulls, this allows better error messages should btdu run out of memory. (Mainly this is useful for testing and profiling.)

Variables

growAllocator
CheckedAllocator!GrowAllocator growAllocator;
Undocumented in source.

Meta