std.experimental.allocator.building_blocks.null_allocator

Types 1

NullAllocator is an emphatically empty implementation of the allocator interface. Although it has no direct use, it is useful as a "terminator" in composite allocators.

Fields
uint alignment`NullAllocator` advertises a relatively large alignment equal to 64 KB. This is because `NullAllocator` never actually needs to honor this alignment and because composite allocators using `NullAllo...
NullAllocator instanceReturns the `shared` global instance of the `NullAllocator`.
Methods
void[] allocate(size_t) sharedAlways returns `null`.
void[] alignedAllocate(size_t, uint) sharedAlways returns `null`.
void[] allocateAll() sharedAlways returns `null`.
bool expand(ref void[] b, size_t s) sharedThese methods return `false`. Precondition: b is null. This is because there is no other possible legitimate input.
bool reallocate(ref void[] b, size_t) sharedDitto
bool alignedReallocate(ref void[] b, size_t, uint) sharedDitto
Ternary owns(const void[]) shared constReturns `Ternary.no`.
Ternary resolveInternalPointer(const void *, ref void[]) shared constReturns `Ternary.no`.
bool deallocate(void[] b) sharedNo-op. Precondition: b is null
bool deallocateAll() sharedNo-op.
Ternary empty() shared constReturns `Ternary.yes`.