Main MRPT website > C++ reference for MRPT 1.5.7
Classes | Macros | Typedefs | Functions | Variables
jmemmgr.cpp File Reference
#include "jinclude.h"
#include "mrpt_jpeglib.h"
#include "jmemsys.h"
Include dependency graph for jmemmgr.cpp:

Go to the source code of this file.

Classes

union  small_pool_struct
 
union  large_pool_struct
 
struct  my_memory_mgr
 
struct  jvirt_sarray_control
 
struct  jvirt_barray_control
 

Macros

#define JPEG_INTERNALS
 
#define AM_MEMORY_MANAGER   /* we define jvirt_Xarray_control structs */
 
#define ALIGN_TYPE   double
 
#define MIN_SLOP   50 /* greater than 0 to avoid futile looping */
 

Typedefs

typedef union small_pool_structsmall_pool_ptr
 
typedef union small_pool_struct small_pool_hdr
 
typedef union large_pool_struct FARlarge_pool_ptr
 
typedef union large_pool_struct large_pool_hdr
 
typedef my_memory_mgrmy_mem_ptr
 

Functions

 out_of_memory (j_common_ptr cinfo, int which)
 
 alloc_small (j_common_ptr cinfo, int pool_id, size_t sizeofobject)
 
 alloc_large (j_common_ptr cinfo, int pool_id, size_t sizeofobject)
 
 alloc_sarray (j_common_ptr cinfo, int pool_id, JDIMENSION samplesperrow, JDIMENSION numrows)
 
 alloc_barray (j_common_ptr cinfo, int pool_id, JDIMENSION blocksperrow, JDIMENSION numrows)
 
 request_virt_sarray (j_common_ptr cinfo, int pool_id, boolean pre_zero, JDIMENSION samplesperrow, JDIMENSION numrows, JDIMENSION maxaccess)
 
 request_virt_barray (j_common_ptr cinfo, int pool_id, boolean pre_zero, JDIMENSION blocksperrow, JDIMENSION numrows, JDIMENSION maxaccess)
 
 realize_virt_arrays (j_common_ptr cinfo)
 
 do_sarray_io (j_common_ptr cinfo, jvirt_sarray_ptr ptr, boolean writing)
 
 do_barray_io (j_common_ptr cinfo, jvirt_barray_ptr ptr, boolean writing)
 
 access_virt_sarray (j_common_ptr cinfo, jvirt_sarray_ptr ptr, JDIMENSION start_row, JDIMENSION num_rows, boolean writable)
 
 access_virt_barray (j_common_ptr cinfo, jvirt_barray_ptr ptr, JDIMENSION start_row, JDIMENSION num_rows, boolean writable)
 
 free_pool (j_common_ptr cinfo, int pool_id)
 
 self_destruct (j_common_ptr cinfo)
 
 jinit_memory_mgr (j_common_ptr cinfo)
 

Variables

static const size_t first_pool_slop [JPOOL_NUMPOOLS]
 
static const size_t extra_pool_slop [JPOOL_NUMPOOLS]
 

Macro Definition Documentation

◆ ALIGN_TYPE

#define ALIGN_TYPE   double

Definition at line 56 of file jmemmgr.cpp.

Referenced by alloc_large(), alloc_small(), and jinit_memory_mgr().

◆ AM_MEMORY_MANAGER

#define AM_MEMORY_MANAGER   /* we define jvirt_Xarray_control structs */

Definition at line 11 of file jmemmgr.cpp.

◆ JPEG_INTERNALS

#define JPEG_INTERNALS

Definition at line 10 of file jmemmgr.cpp.

◆ MIN_SLOP

#define MIN_SLOP   50 /* greater than 0 to avoid futile looping */

Definition at line 236 of file jmemmgr.cpp.

Referenced by alloc_small().

Typedef Documentation

◆ large_pool_hdr

◆ large_pool_ptr

Definition at line 83 of file jmemmgr.cpp.

◆ my_mem_ptr

Definition at line 123 of file jmemmgr.cpp.

◆ small_pool_hdr

◆ small_pool_ptr

Definition at line 72 of file jmemmgr.cpp.

Function Documentation

◆ access_virt_barray()

access_virt_barray ( j_common_ptr  cinfo,
jvirt_barray_ptr  ptr,
JDIMENSION  start_row,
JDIMENSION  num_rows,
boolean  writable 
)

Definition at line 824 of file jmemmgr.cpp.

References do_barray_io(), ERREXIT, FALSE, FAR, jzero_far(), num_rows, SIZEOF, and TRUE.

Referenced by jinit_memory_mgr().

◆ access_virt_sarray()

access_virt_sarray ( j_common_ptr  cinfo,
jvirt_sarray_ptr  ptr,
JDIMENSION  start_row,
JDIMENSION  num_rows,
boolean  writable 
)

Definition at line 739 of file jmemmgr.cpp.

References do_sarray_io(), ERREXIT, FALSE, FAR, jzero_far(), num_rows, SIZEOF, and TRUE.

Referenced by jinit_memory_mgr().

◆ alloc_barray()

alloc_barray ( j_common_ptr  cinfo,
int  pool_id,
JDIMENSION  blocksperrow,
JDIMENSION  numrows 
)

◆ alloc_large()

alloc_large ( j_common_ptr  cinfo,
int  pool_id,
size_t  sizeofobject 
)

◆ alloc_sarray()

alloc_sarray ( j_common_ptr  cinfo,
int  pool_id,
JDIMENSION  samplesperrow,
JDIMENSION  numrows 
)

◆ alloc_small()

alloc_small ( j_common_ptr  cinfo,
int  pool_id,
size_t  sizeofobject 
)

◆ do_barray_io()

do_barray_io ( j_common_ptr  cinfo,
jvirt_barray_ptr  ptr,
boolean  writing 
)

Definition at line 706 of file jmemmgr.cpp.

References FAR, MIN, and SIZEOF.

Referenced by access_virt_barray().

◆ do_sarray_io()

do_sarray_io ( j_common_ptr  cinfo,
jvirt_sarray_ptr  ptr,
boolean  writing 
)

Definition at line 673 of file jmemmgr.cpp.

References FAR, MIN, and SIZEOF.

Referenced by access_virt_sarray().

◆ free_pool()

free_pool ( j_common_ptr  cinfo,
int  pool_id 
)

◆ jinit_memory_mgr()

jinit_memory_mgr ( j_common_ptr  cinfo)

◆ out_of_memory()

out_of_memory ( j_common_ptr  cinfo,
int  which 
)

Definition at line 200 of file jmemmgr.cpp.

References ERREXIT1.

Referenced by alloc_large(), and alloc_small().

◆ realize_virt_arrays()

realize_virt_arrays ( j_common_ptr  cinfo)

◆ request_virt_barray()

request_virt_barray ( j_common_ptr  cinfo,
int  pool_id,
boolean  pre_zero,
JDIMENSION  blocksperrow,
JDIMENSION  numrows,
JDIMENSION  maxaccess 
)

Definition at line 536 of file jmemmgr.cpp.

References alloc_small(), ERREXIT1, FALSE, JPOOL_IMAGE, SIZEOF, and my_memory_mgr::virt_barray_list.

Referenced by jinit_memory_mgr().

◆ request_virt_sarray()

request_virt_sarray ( j_common_ptr  cinfo,
int  pool_id,
boolean  pre_zero,
JDIMENSION  samplesperrow,
JDIMENSION  numrows,
JDIMENSION  maxaccess 
)

Definition at line 506 of file jmemmgr.cpp.

References alloc_small(), ERREXIT1, FALSE, JPOOL_IMAGE, SIZEOF, and my_memory_mgr::virt_sarray_list.

Referenced by jinit_memory_mgr().

◆ self_destruct()

self_destruct ( j_common_ptr  cinfo)

Definition at line 985 of file jmemmgr.cpp.

References free_pool(), jpeg_free_small(), jpeg_mem_term(), JPOOL_NUMPOOLS, JPOOL_PERMANENT, and SIZEOF.

Referenced by jinit_memory_mgr().

Variable Documentation

◆ extra_pool_slop

const size_t extra_pool_slop[JPOOL_NUMPOOLS]
static
Initial value:
=
{
0,
5000
}

Definition at line 230 of file jmemmgr.cpp.

Referenced by alloc_small().

◆ first_pool_slop

const size_t first_pool_slop[JPOOL_NUMPOOLS]
static
Initial value:
=
{
1600,
16000
}

Definition at line 224 of file jmemmgr.cpp.

Referenced by alloc_small().




Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019