libcopp  2.2.0
Public Member Functions
allocator::stack_allocator_posix Class Reference

memory allocator this allocator will create buffer using posix api and protect it More...

#include <stack_allocator_posix.h>

Collaboration diagram for allocator::stack_allocator_posix:
Collaboration graph

Public Member Functions

 stack_allocator_posix () LIBCOPP_MACRO_NOEXCEPT
 
 ~stack_allocator_posix ()
 
 stack_allocator_posix (const stack_allocator_posix &other) LIBCOPP_MACRO_NOEXCEPT
 
stack_allocator_posixoperator= (const stack_allocator_posix &other) LIBCOPP_MACRO_NOEXCEPT
 
 stack_allocator_posix (stack_allocator_posix &&other) LIBCOPP_MACRO_NOEXCEPT
 
stack_allocator_posixoperator= (stack_allocator_posix &&other) LIBCOPP_MACRO_NOEXCEPT
 
void allocate (stack_context &, std::size_t) LIBCOPP_MACRO_NOEXCEPT
 
void deallocate (stack_context &) LIBCOPP_MACRO_NOEXCEPT
 

Detailed Description

memory allocator this allocator will create buffer using posix api and protect it

Definition at line 24 of file stack_allocator_posix.h.

Constructor & Destructor Documentation

◆ stack_allocator_posix() [1/3]

LIBCOPP_COPP_API allocator::stack_allocator_posix::stack_allocator_posix ( )

Definition at line 45 of file stack_allocator_posix.cpp.

◆ ~stack_allocator_posix()

LIBCOPP_COPP_API allocator::stack_allocator_posix::~stack_allocator_posix ( )

Definition at line 46 of file stack_allocator_posix.cpp.

◆ stack_allocator_posix() [2/3]

LIBCOPP_COPP_API allocator::stack_allocator_posix::stack_allocator_posix ( const stack_allocator_posix other)

Definition at line 47 of file stack_allocator_posix.cpp.

◆ stack_allocator_posix() [3/3]

LIBCOPP_COPP_API allocator::stack_allocator_posix::stack_allocator_posix ( stack_allocator_posix &&  other)

Definition at line 53 of file stack_allocator_posix.cpp.

Member Function Documentation

◆ allocate()

LIBCOPP_COPP_API void allocator::stack_allocator_posix::allocate ( stack_context ctx,
std::size_t  size 
)

allocate memory and attach to stack context [standard function]

Parameters
ctxstack context
sizestack size

Definition at line 59 of file stack_allocator_posix.cpp.

References stack_traits::maximum_size(), stack_traits::minimum_size(), stack_traits::page_size(), stack_traits::round_to_page_size(), and gsl::size().

◆ deallocate()

LIBCOPP_COPP_API void allocator::stack_allocator_posix::deallocate ( stack_context ctx)

deallocate memory from stack context [standard function]

Parameters
ctxstack context

Definition at line 90 of file stack_allocator_posix.cpp.

References stack_traits::is_unbounded(), stack_traits::maximum_size(), and stack_traits::minimum_size().

◆ operator=() [1/2]

LIBCOPP_COPP_API stack_allocator_posix & allocator::stack_allocator_posix::operator= ( const stack_allocator_posix other)

Definition at line 48 of file stack_allocator_posix.cpp.

◆ operator=() [2/2]

LIBCOPP_COPP_API stack_allocator_posix & allocator::stack_allocator_posix::operator= ( stack_allocator_posix &&  other)

Definition at line 54 of file stack_allocator_posix.cpp.


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