OpenJPH
Open-source implementation of JPEG2000 Part-15
Loading...
Searching...
No Matches
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 ()
void restart ()
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
size_t allocated_data
bool preallocation

Detailed Description

Definition at line 75 of file ojph_mem.h.

Constructor & Destructor Documentation

◆ mem_fixed_allocator()

ojph::mem_fixed_allocator::mem_fixed_allocator ( )
inline

Definition at line 78 of file ojph_mem.h.

References allocated_data, restart(), and store.

◆ ~mem_fixed_allocator()

ojph::mem_fixed_allocator::~mem_fixed_allocator ( )
inline

Definition at line 83 of file ojph_mem.h.

References store.

Member Function Documentation

◆ alloc()

void ojph::mem_fixed_allocator::alloc ( )
inline

◆ post_alloc_data()

template<typename T>
T * ojph::mem_fixed_allocator::post_alloc_data ( size_t num_ele,
ui32 pre_size )
inline

◆ 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 )
inlineprivate

Definition at line 155 of file ojph_mem.h.

References ojph::align_ptr(), ojph::calc_aligned_size(), and preallocation.

Referenced by post_alloc_data(), and post_alloc_obj().

◆ post_alloc_obj()

template<typename T>
T * ojph::mem_fixed_allocator::post_alloc_obj ( size_t num_ele)
inline

◆ pre_alloc_data()

template<typename T>
void ojph::mem_fixed_allocator::pre_alloc_data ( size_t num_ele,
ui32 pre_size )
inline

◆ 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 )
inlineprivate

Definition at line 144 of file ojph_mem.h.

References ojph::calc_aligned_size(), and preallocation.

Referenced by pre_alloc_data(), and pre_alloc_obj().

◆ pre_alloc_obj()

template<typename T>
void ojph::mem_fixed_allocator::pre_alloc_obj ( size_t num_ele)
inline

◆ restart()

void ojph::mem_fixed_allocator::restart ( )
inline

Definition at line 121 of file ojph_mem.h.

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

Referenced by mem_fixed_allocator().

Member Data Documentation

◆ allocated_data

size_t ojph::mem_fixed_allocator::allocated_data
private

Definition at line 172 of file ojph_mem.h.

Referenced by alloc(), and mem_fixed_allocator().

◆ avail_data

void * ojph::mem_fixed_allocator::avail_data
private

Definition at line 170 of file ojph_mem.h.

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

◆ avail_obj

void * ojph::mem_fixed_allocator::avail_obj
private

Definition at line 170 of file ojph_mem.h.

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

◆ avail_size_data

size_t ojph::mem_fixed_allocator::avail_size_data
private

Definition at line 171 of file ojph_mem.h.

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

◆ avail_size_obj

size_t ojph::mem_fixed_allocator::avail_size_obj
private

Definition at line 171 of file ojph_mem.h.

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

◆ preallocation

bool ojph::mem_fixed_allocator::preallocation
private

Definition at line 173 of file ojph_mem.h.

Referenced by alloc(), post_alloc_local(), pre_alloc_local(), and restart().

◆ size_data

size_t ojph::mem_fixed_allocator::size_data
private

Definition at line 171 of file ojph_mem.h.

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

◆ size_obj

size_t ojph::mem_fixed_allocator::size_obj
private

Definition at line 171 of file ojph_mem.h.

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

◆ store

void* ojph::mem_fixed_allocator::store
private

Definition at line 170 of file ojph_mem.h.

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


The documentation for this class was generated from the following file:
  • /build/openjph/src/OpenJPH-0.24.2/src/core/common/ojph_mem.h