[#BloombergLP-bdlma-BufferManager-truncate] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlma.adoc[bdlma]::xref:BloombergLP/bdlma/BufferManager.adoc[BufferManager]::truncate :relfileprefix: ../../../ :mrdocs: Reduce the amount of memory allocated at the specified `address` of the specified `originalSize` (in bytes) to the specified `newSize` (in bytes). Return `newSize` after truncating, or `originalSize` if the memory at `address` cannot be truncated. This method can only `truncate` the memory block returned by the most recent `allocate` or `allocateRaw` request from this object, and otherwise has no effect. The behavior is undefined unless the memory at `address` was originally allocated by this buffer manager, the size of the memory at `address` is `originalSize`, `newSize <= originalSize`, `0 <= newSize`, and `release` was not called after allocating the memory at `address`. == Synopsis Declared in `<bdlma_buffermanager.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] truncate( void* address, xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] originalSize, xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] newSize); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#