composable_allocator_traits< memory_stack< BlockAllocator > > Class Template Reference
Allocator implementations

## Detailed Description

template<class BlockAllocator>
class foonathan::memory::composable_allocator_traits< memory_stack< BlockAllocator > >

Specialization of the composable_allocator_traits for memory_stack classes.

## Typedefs

using | allocator_type = memory_stack< BlockAllocator >

## Static Functions

static void * | try_allocate_node (allocator_type &state, std::size_t size, std::size_t alignment) noexcept
static void * | try_allocate_array (allocator_type &state, std::size_t count, std::size_t size, std::size_t alignment) noexcept
static bool | try_deallocate_node (allocator_type &state, void *ptr, std::size_t, std::size_t) noexcept
static bool | try_deallocate_array (allocator_type &state, void *ptr, std::size_t count, std::size_t size, std::size_t alignment) noexcept

## Member Functions

## try_allocate_node()

template<class BlockAllocator >

static void * try_allocate_node | ( | allocator_type & | state,
|  | std::size_t | size,
|  | std::size_t | alignment
| ) |  |

static noexcept

Returns:
  The result of memory_stack::try_allocate().

## try_allocate_array()

template<class BlockAllocator >

static void * try_allocate_array | ( | allocator_type & | state,
|  | std::size_t | count,
|  | std::size_t | size,
|  | std::size_t | alignment
| ) |  |

static noexcept

Returns:
  The result of memory_stack::try_allocate().

## try_deallocate_node()

template<class BlockAllocator >

static bool try_deallocate_node | ( | allocator_type & | state,
|  | void * | ptr,
|  | std::size_t | ,
|  | std::size_t |
| ) |  |

static noexcept

Effects:
  Does nothing.

Returns:
  Whether the memory will be deallocated by memory_stack::unwind().

## try_deallocate_array()

template<class BlockAllocator >

static bool try_deallocate_array | ( | allocator_type & | state,
|  | void * | ptr,
|  | std::size_t | count,
|  | std::size_t | size,
|  | std::size_t | alignment
| ) |  |

static noexcept

Effects:
  Does nothing.

Returns:
  Whether the memory will be deallocated by memory_stack::unwind().