CheckedAllocator

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.)

Members

Aliases

parent
alias parent = ParentAllocator.instance
Undocumented in source.

Functions

allocate
void[] allocate(size_t n)
Undocumented in source. Be warned that the author may not have intended to support it.
deallocate
bool deallocate(void[] b)
Undocumented in source. Be warned that the author may not have intended to support it.
deallocateAll
bool deallocateAll()
Undocumented in source. Be warned that the author may not have intended to support it.
empty
Ternary empty()
Undocumented in source. Be warned that the author may not have intended to support it.
expand
bool expand(void[] b, size_t delta)
Undocumented in source. Be warned that the author may not have intended to support it.
goodAllocSize
size_t goodAllocSize(size_t n)
Undocumented in source. Be warned that the author may not have intended to support it.
owns
Ternary owns(void[] b)
Undocumented in source. Be warned that the author may not have intended to support it.
reallocate
bool reallocate(void[] b, size_t s)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

alignment
enum alignment;
Undocumented in source.

Static variables

instance
CheckedAllocator instance;
Undocumented in source.

Variables

parent
ParentAllocator parent;
Undocumented in source.

Meta