memory
Member Functions
null_allocator Class Reference

Detailed Description

A composable RawAllocator that will always fail.

This is useful for compositioning or as last resort in binary_segregator.

Member Functions

void * allocate_node (std::size_t size, std::size_t)
 
void deallocate_node (void *, std::size_t, std::size_t) noexcept
 
void * try_allocate_node (std::size_t, std::size_t) noexcept
 
bool try_deallocate_node (void *, std::size_t, std::size_t) noexcept
 

Member Functions

◆ allocate_node()

void* allocate_node ( std::size_t  size,
std::size_t   
)
Effects:
Will always throw.
Throws:
A out_of_fixed_memory exception.

◆ deallocate_node()

void deallocate_node ( void *  ,
std::size_t  ,
std::size_t   
)
noexcept
Requires:
Must not be called.

◆ try_allocate_node()

void* try_allocate_node ( std::size_t  ,
std::size_t   
)
noexcept
Effects:
Does nothing.
Returns:
Always returns nullptr.

◆ try_deallocate_node()

bool try_deallocate_node ( void *  ,
std::size_t  ,
std::size_t   
)
noexcept
Effects:
Does nothing.
Returns:
Always returns false.