alignedReallocate

The default alignedReallocate function first attempts to use expand. If Allocator.expand is not defined or returns false, alignedReallocate allocates a new block of memory of appropriate size and copies data from the old block to the new block. Finally, if Allocator defines deallocate, alignedReallocate uses it to free the old memory block.

alignedReallocate does not attempt to use Allocator.reallocate even if defined. This is deliberate so allocators may use it internally within their own implementation of reallocate.

bool
alignedReallocate
(
Allocator
)
(
ref Allocator alloc
,
ref void[] b
,
size_t s
,
uint a
)
if (
hasMember!(Allocator, "alignedAllocate")
)

Meta