Return a newly allocated block of memory.

Synopsis

Declared in <bslma_sequentialallocator.h>

virtual
void*
allocate(size_type numBytes) override;

Description

Return a newly allocated block of memory of (at least) the specified positive numBytes (bytes). If numBytes is 0, a null pointer is returned with no effect. The behavior is undefined unless 0 <= numBytes. Note that the alignment of the address returned is the maximum alignment for any fundamental type defined for the calling platform.

Return Value

The address of the allocated memory block.

Parameters

Name

Description

numBytes

The minimum number of bytes to allocate.

Created with MrDocs