Sources Pipelines Documentation

Allocators  
Public Member Functions | List of all members
boost::memory::null_allocator Class Reference

An allocator acting as the last fallback allocator, allocating only nullptr. More...

#include <null_allocator.hpp>

Public Member Functions

memory_block allocate (std::size_t size=0)
 
void deallocate (memory_block &block)
 
bool owns (memory_block &block)
 Checks if the given block is owned by this allocator. More...
 

Detailed Description

An allocator acting as the last fallback allocator, allocating only nullptr.

It's a terminal allocator capable of allocating only { nullptr, 0ul } blocks.

Definition at line 20 of file null_allocator.hpp.

Member Function Documentation

memory_block boost::memory::null_allocator::allocate ( std::size_t  size = 0)
inline

Always allocates { nullptr, 0ul } block.

Parameters
sizeRequested allocation size.
Returns
Allocated memory block description.

Definition at line 10 of file null_allocator.ipp.

void boost::memory::null_allocator::deallocate ( memory_block block)
inline

Does nothing.

Parameters
blockA block to deallocate.

Definition at line 15 of file null_allocator.ipp.

bool boost::memory::null_allocator::owns ( memory_block block)
inline

Checks if the given block is owned by this allocator.

Parameters
blockA memory_block which ownership is going to be checked.
Returns
true if this allocator owns the given block, false otherwise.

Definition at line 21 of file null_allocator.ipp.


The documentation for this class was generated from the following files: