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.
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 NullAllocator
shouldn't be unnecessarily constrained.
Always returns null
.
Always returns null
.
Always returns null
.
These methods return false
.
b is null
. This is because there is no other possible legitimate input.Returns Ternary.no
.
Returns Ternary.no
.
No-op.
b is null
No-op.
Returns Ternary.yes
.
Returns the shared
global instance of the NullAllocator
.
© 1999–2019 The D Language Foundation
Licensed under the Boost License 1.0.
https://dlang.org/phobos/std_experimental_allocator_building_blocks_null_allocator.html