Protocol for clients and suppliers of raw aligned memory.

Synopsis

Declared in <bdlma_alignedallocator.h>

class AlignedAllocator
    : public bslma::Allocator

Description

This protocol provides a pure abstract interface and contract for clients and suppliers of raw aligned memory. If the requested memory cannot be returned, the contract requires that an std::bad_alloc exception be thrown.

Base Classes

Name

Description

bslma::Allocator

Pure abstract protocol for clients and suppliers of raw memory.

Type Aliases

Name

Description

size_type

Alias for an unsigned integral type capable of representing the number of bytes in this platform's virtual address space.

Member Functions

Name

Description

operator=

allocate

Return a newly allocated block of memory of at least size bytes.

allocateAligned [virtual]

Return a newly allocated block of at least size bytes with alignment.

deallocate

Return the memory block at address to this allocator.

deleteObject

deleteObject overloads

deleteObjectRaw

deleteObjectRaw overloads

is_equal

Static Member Functions

Name

Description

throwBadAlloc

Throw std::bad_alloc or abort the program.

Protected Member Functions

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.

Created with MrDocs