stdx.allocator.building_blocks.null_allocator
-
Declaration
struct
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.
-
Declaration
enum uint
alignment
;advertises a relatively large alignment equal to 64 KB. This is because never actually needs to honor this
alignment
and because composite allocators using shouldn't be unnecessarily constrained. -
Declaration
shared void[]
allocate
(size_t);Always returns .
-
Declaration
shared void[]
alignedAllocate
(size_t, uint);Always returns .
-
Declaration
shared void[]
allocateAll
();Always returns .
-
Declaration
shared bool
expand
(ref void[]b
, size_ts
);
shared boolreallocate
(ref void[]b
, size_t);
shared boolalignedReallocate
(ref void[]b
, size_t, uint);These methods return .
Precondition: . This is because there is no other possible legitimate input.
-
Declaration
shared const Ternary
owns
(void[]);Returns .
-
Declaration
shared const Ternary
resolveInternalPointer
(const void*, ref void[]);Returns .
-
Declaration
shared bool
deallocate
(void[]b
);No-op.
Precondition:
-
Declaration
shared bool
deallocateAll
();No-op.
-
Declaration
shared const Ternary
empty
();Returns .
-
Declaration
static shared NullAllocator
instance
;Returns the global
instance
of the .
-