BloombergLP::bslma::SequentialPool::truncate

Reduce the amount of memory allocated at the specified address from the specified originalNumBytes to the specified newNumBytes. Return the amount of memory available at address after the truncation. The behavior is undefined unless the call to this allocator that provided the address was performed with the originalNumBytes and newNumBytes <= originalNumBytes. Note that this function will not truncate the memory unless there have been no allocations since the allocation for originalNumBytes.

Synopsis

Declared in <bslma_sequentialpool.h>

int
truncate(
    void* address,
    int originalNumBytes,
    int newNumBytes);