Concrete thread-safe guarding allocator that adjoins a protected guard page to each allocated block.
This class defines a concrete thread-safe "guarding" allocator mechanism that implements the bslma::Allocator protocol, and adjoins a read/write protected guard page to each block of memory returned by the allocate method. The guard page is placed immediately before or immediately following the block returned from allocate according to the GuardPageLocation enumerator value (optionally) supplied at construction. Note that, unlike many other allocators, an allocator cannot be (optionally) supplied at construction; instead, a system facility is used that allocates blocks of memory in multiples of the system page size. Also note that this allocator is intended for debugging purposes only.
| Name | Description |
|---|---|
bslma::Allocator | Pure abstract protocol for clients and suppliers of raw memory. |
| Name | Description |
|---|---|
size_type | Alias for an unsigned integral type capable of representing the number of bytes in this platform's virtual address space. |
| Name | Description |
|---|---|
GuardPageLocation | Enumerate the configuration options for GuardingAllocator that may be (optionally) supplied at construction. |
| Name | Description |
|---|---|
GuardingAllocator [constructor] | Create a guarding allocator. |
~GuardingAllocator [destructor] [virtual] | Destroy this allocator object. Note that destroying this allocator has no effect on any outstanding allocated memory. |
operator= | |
allocate | allocate overloads |
deallocate | Return the memory block at the specified address back to this allocator. |
deleteObject | deleteObject overloads |
deleteObjectRaw | deleteObjectRaw overloads |
is_equal |
| Name | Description |
|---|---|
throwBadAlloc | Throw std::bad_alloc or abort the program. |
| Name | Description |
|---|---|
do_allocate [virtual] | Return a newly allocated block of at least bytes with alignment. |
do_deallocate [virtual] | Return the memory block at p having bytes and alignment. |
do_is_equal [virtual] | Return whether this allocator can exchange memory with other. |