reallocate

The default reallocate function first attempts to use expand. If Allocator.expand is not defined or returns false, reallocate 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, reallocate uses it to free the old memory block.

reallocate 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
reallocate
(
Allocator
)
(
ref Allocator a
,
ref void[] b
,
size_t s
)

Meta