Tesseract 3.01
/data/source/tesseract-ocr/ccutil/memblk.h File Reference
#include "params.h"

Go to the source code of this file.

Classes

class  MEMUNION
class  MEMBLOCK
class  FREE_CALL
class  MALLOC_CALL
class  MEM_ALLOCATOR

Defines

#define MAXBLOCKS   16
#define MAX_STRUCTS   20
#define MAX_CLASSES   24
#define MAX_FREE_S_BLOCKS   10
#define STRUCT_BLOCK_SIZE   2521
#define MAX_CHUNK   262144
#define FIRSTSIZE   16384
#define LASTSIZE   262144
#define BIGSIZE   2100000
#define MAX_BIGCHUNK   20000000

Functions

void * trace_caller (inT32 depth)
inT32 identify_struct_owner (inT32 struct_count, const char *name)
void check_struct (inT8 level, inT32 count)
void check_structs (inT8 level)
void * new_struct_block ()
void old_struct_block (MEMUNION *deadblock)

Variables

MEM_ALLOCATOR big_mem
MEM_ALLOCATOR main_mem
MEMUNIONfree_structs [MAX_STRUCTS]
inT32 structs_in_use [MAX_STRUCTS]
inT32 blocks_in_use [MAX_STRUCTS]
MEMUNIONstruct_blocks [MAX_STRUCTS]
inT32 owner_counts [MAX_STRUCTS][MAX_CLASSES]
int mem_mallocdepth = 0
int mem_mallocbits = 8
int mem_freedepth = 0
int mem_freebits = 8
int mem_countbuckets = 16
int mem_checkfreq = 0

Define Documentation

#define BIGSIZE   2100000
#define FIRSTSIZE   16384
#define LASTSIZE   262144
#define MAX_BIGCHUNK   20000000
#define MAX_CHUNK   262144
#define MAX_CLASSES   24
#define MAX_FREE_S_BLOCKS   10
#define MAX_STRUCTS   20
#define MAXBLOCKS   16
#define STRUCT_BLOCK_SIZE   2521

Function Documentation

void check_struct ( inT8  level,
inT32  count 
)
void check_structs ( inT8  level)
inT32 identify_struct_owner ( inT32  struct_count,
const char *  name 
)
void* new_struct_block ( )
void old_struct_block ( MEMUNION deadblock)
void* trace_caller ( inT32  depth)

Variable Documentation

inT32 blocks_in_use[MAX_STRUCTS]
MEMUNION* free_structs[MAX_STRUCTS]
int mem_checkfreq = 0

"Calls to alloc_mem between owner counts"

int mem_countbuckets = 16

"No of buckets for histogram"

int mem_freebits = 8

"Log 2 of hash table size"

int mem_freedepth = 0

"Free stack dpeth to trace"

int mem_mallocbits = 8

"Log 2 of hash table size"

int mem_mallocdepth = 0

"Malloc stack depth to trace"

inT32 owner_counts[MAX_STRUCTS][MAX_CLASSES]
MEMUNION* struct_blocks[MAX_STRUCTS]
inT32 structs_in_use[MAX_STRUCTS]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines