Return a newly allocated maximally-aligned block of size bytes with an adjoining protected guard page.
Declared in <bdlma_guardingallocator.h>
virtual
void*
allocate(bsls::Types::size_type size) override;
Return a newly-allocated maximally-aligned block of memory of the specified size (in bytes) that has a read/write protected guard page located immediately before or after it according to the GuardPageLocation indicated at construction. If size is 0, no memory is allocated and 0 is returned. Note that a multiple of the platform's memory page size is allocated for every call to this method.
address of the newly allocated block, or a null pointer if size is 0
| Name | Description |
|---|---|
| size | number of bytes to allocate |