CppServer  1.0.4.0
C++ Server Library
Public Member Functions | List of all members
CppServer::Asio::HandlerStorage Class Reference

Asio handler storage. More...

#include <memory.h>

Public Member Functions

 HandlerStorage () noexcept
 
 HandlerStorage (const HandlerStorage &)=delete
 
 HandlerStorage (HandlerStorage &&)=delete
 
 ~HandlerStorage () noexcept=default
 
HandlerStorageoperator= (const HandlerStorage &)=delete
 
HandlerStorageoperator= (HandlerStorage &&)=delete
 
void * allocate (size_t size)
 Allocate memory buffer. More...
 
void deallocate (void *ptr)
 Deallocate memory buffer. More...
 

Detailed Description

Asio handler storage.

Class to manage the memory to be used for handler-based custom allocation. It contains a single block of memory which may be returned for allocation requests. If the memory is in use when an allocation request is made, the allocator delegates allocation to the global heap.

Not thread-safe.

Definition at line 26 of file memory.h.

Constructor & Destructor Documentation

◆ HandlerStorage() [1/3]

CppServer::Asio::HandlerStorage::HandlerStorage ( )
inlinenoexcept

Definition at line 29 of file memory.h.

◆ HandlerStorage() [2/3]

CppServer::Asio::HandlerStorage::HandlerStorage ( const HandlerStorage )
delete

◆ HandlerStorage() [3/3]

CppServer::Asio::HandlerStorage::HandlerStorage ( HandlerStorage &&  )
delete

◆ ~HandlerStorage()

CppServer::Asio::HandlerStorage::~HandlerStorage ( )
defaultnoexcept

Member Function Documentation

◆ allocate()

void * CppServer::Asio::HandlerStorage::allocate ( size_t  size)
inline

Allocate memory buffer.

Parameters
size- Size of allocated block in bytes
Returns
Pointer to the allocated buffer

Definition at line 12 of file memory.inl.

◆ deallocate()

void CppServer::Asio::HandlerStorage::deallocate ( void *  ptr)
inline

Deallocate memory buffer.

Parameters
ptr- Pointer to the allocated buffer

Definition at line 25 of file memory.inl.

◆ operator=() [1/2]

HandlerStorage& CppServer::Asio::HandlerStorage::operator= ( const HandlerStorage )
delete

◆ operator=() [2/2]

HandlerStorage& CppServer::Asio::HandlerStorage::operator= ( HandlerStorage &&  )
delete

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