OpenJPH: ojph::mem_elastic_allocator Class Reference

OpenJPH Open-source implementation of JPEG2000 Part-15

Loading...
Searching...
No Matches
ojph::mem_elastic_allocator Class Reference

`#include <ojph_mem.h>`

## Classes
struct | stores_list

## Public Member Functions
| mem_elastic_allocator (ui32 chunk_size)
| ~mem_elastic_allocator ()
void | get_buffer (ui32 needed_bytes, coded_lists *&p)
void | restart ()

## Private Member Functions
stores_list * | allocate (stores_list **list, ui32 extended_bytes)

## Private Attributes
stores_list * | store
stores_list * | cur_store
stores_list * | avail
size_t | total_allocated
const ui32 | chunk_size

## Detailed Description

Definition at line 217 of file ojph_mem.h.

## Constructor & Destructor Documentation

## ◆ mem_elastic_allocator()

ojph::mem_elastic_allocator::mem_elastic_allocator | ( | ui32 | chunk_size | ) |
| inline

Definition at line 224 of file ojph_mem.h.

References avail, chunk_size, cur_store, store, and total_allocated.

## ◆ ~mem_elastic_allocator()

ojph::mem_elastic_allocator::~mem_elastic_allocator | ( |  | ) |
| inline

Definition at line 228 of file ojph_mem.h.

References avail, and store.

## Member Function Documentation

## ◆ allocate()

mem_elastic_allocator::stores_list * ojph::mem_elastic_allocator::allocate | ( | mem_elastic_allocator::stores_list ** | list,
|  | ui32 | extended_bytes )
| private

Definition at line 92 of file ojph_mem.cpp.

References avail, chunk_size, ojph::mem_elastic_allocator::stores_list::eval_store_bytes(), ojph_max, and total_allocated.

Referenced by get_buffer().

## ◆ get_buffer()

void ojph::mem_elastic_allocator::get_buffer | ( | ui32 | needed_bytes,
|  | coded_lists *& | p )

Definition at line 113 of file ojph_mem.cpp.

References allocate(), cur_store, and store.

Referenced by ojph::local::bb_expand_buf(), ojph::local::bb_read_chunk(), ojph::local::ojph_encode_codeblock32(), and ojph::local::ojph_encode_codeblock64().

## ◆ restart()

void ojph::mem_elastic_allocator::restart | ( |  | ) |

Definition at line 133 of file ojph_mem.cpp.

References avail, cur_store, and store.

## Member Data Documentation

## ◆ avail

stores_list* ojph::mem_elastic_allocator::avail
| private

Definition at line 281 of file ojph_mem.h.

Referenced by allocate(), mem_elastic_allocator(), restart(), and ~mem_elastic_allocator().

## ◆ chunk_size

const ui32 ojph::mem_elastic_allocator::chunk_size
| private

Definition at line 283 of file ojph_mem.h.

Referenced by allocate(), and mem_elastic_allocator().

## ◆ cur_store

stores_list* ojph::mem_elastic_allocator::cur_store
| private

Definition at line 280 of file ojph_mem.h.

Referenced by get_buffer(), mem_elastic_allocator(), and restart().

## ◆ store

stores_list* ojph::mem_elastic_allocator::store
| private

Definition at line 279 of file ojph_mem.h.

Referenced by get_buffer(), mem_elastic_allocator(), restart(), and ~mem_elastic_allocator().

## ◆ total_allocated

size_t ojph::mem_elastic_allocator::total_allocated
| private

Definition at line 282 of file ojph_mem.h.

Referenced by allocate(), and mem_elastic_allocator().

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

- /build/openjph/src/OpenJPH/src/core/openjph/ojph_mem.h
- /build/openjph/src/OpenJPH/src/core/others/ojph_mem.cpp