ojph::mem_fixed_allocator Class Reference

`#include <ojph_mem.h>`

## Public Member Functions

| mem_fixed_allocator ()
| ~mem_fixed_allocator ()
template<typename T >
void | pre_alloc_data (size_t num_ele, ui32 pre_size)
template<typename T >
void | pre_alloc_obj (size_t num_ele)
void | alloc ()
template<typename T >
T * | post_alloc_data (size_t num_ele, ui32 pre_size)
template<typename T >
T * | post_alloc_obj (size_t num_ele)

## Private Member Functions

template<typename T , int N>
void | pre_alloc_local (size_t num_ele, ui32 pre_size, size_t &sz)
template<typename T , int N>
T * | post_alloc_local (size_t num_ele, ui32 pre_size, size_t &avail_sz, void *&avail_p)

## Private Attributes

void * | store
void * | avail_data
void * | avail_obj
size_t | size_data
size_t | size_obj
size_t | avail_size_obj
size_t | avail_size_data

## Constructor & Destructor Documentation

## mem_fixed_allocator()

ojph::mem_fixed_allocator::mem_fixed_allocator | ( |  | ) |

inline

References avail_data, avail_obj, avail_size_data, avail_size_obj, size_data, size_obj, and store.

## ~mem_fixed_allocator()

ojph::mem_fixed_allocator::~mem_fixed_allocator | ( |  | ) |

inline

References store.

## Member Function Documentation

## alloc()

void ojph::mem_fixed_allocator::alloc | ( |  | ) |

inline

References avail_data, avail_obj, avail_size_data, avail_size_obj, size_data, size_obj, and store.

## post_alloc_data()

template<typename T >

T * ojph::mem_fixed_allocator::post_alloc_data | ( | size_t | num_ele,
|  | ui32 | pre_size
| ) |  |

inline

References avail_data, and avail_size_data.

Referenced by ojph::line_buf::finalize_alloc().

## post_alloc_local()

template<typename T , int N>

T * ojph::mem_fixed_allocator::post_alloc_local | ( | size_t | num_ele,
|  | ui32 | pre_size,
|  | size_t & | avail_sz,
|  | void *& | avail_p
| ) |  |

inline private

References store.

## post_alloc_obj()

template<typename T >

T * ojph::mem_fixed_allocator::post_alloc_obj | ( | size_t | num_ele | ) |

inline

References avail_obj, and avail_size_obj.

## pre_alloc_data()

template<typename T >

void ojph::mem_fixed_allocator::pre_alloc_data | ( | size_t | num_ele,
|  | ui32 | pre_size
| ) |  |

inline

References size_data.

Referenced by ojph::line_buf::pre_alloc().

## pre_alloc_local()

template<typename T , int N>

void ojph::mem_fixed_allocator::pre_alloc_local | ( | size_t | num_ele,
|  | ui32 | pre_size,
|  | size_t & | sz
| ) |  |

inline private

References store.

## pre_alloc_obj()

template<typename T >

void ojph::mem_fixed_allocator::pre_alloc_obj | ( | size_t | num_ele | ) |

inline

References size_obj.

## Member Data Documentation

## avail_data

void * ojph::mem_fixed_allocator::avail_data

private

Referenced by alloc(), mem_fixed_allocator(), and post_alloc_data().

## avail_obj

void * ojph::mem_fixed_allocator::avail_obj

private

Referenced by alloc(), mem_fixed_allocator(), and post_alloc_obj().

## avail_size_data

size_t ojph::mem_fixed_allocator::avail_size_data

private

Referenced by alloc(), mem_fixed_allocator(), and post_alloc_data().

## avail_size_obj

size_t ojph::mem_fixed_allocator::avail_size_obj

private

Referenced by alloc(), mem_fixed_allocator(), and post_alloc_obj().

## size_data

size_t ojph::mem_fixed_allocator::size_data

private

Referenced by alloc(), mem_fixed_allocator(), and pre_alloc_data().

## size_obj

size_t ojph::mem_fixed_allocator::size_obj

private

Referenced by alloc(), mem_fixed_allocator(), and pre_alloc_obj().

## store

void* ojph::mem_fixed_allocator::store

private

Referenced by alloc(), mem_fixed_allocator(), post_alloc_local(), pre_alloc_local(), and ~mem_fixed_allocator().

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

- ojph_mem.h