FARGOS/VISTA Object Management Environment Core  ..
FARGOS/VISTA Object Management Environment Core Table of Contents
test_malloc.c File Reference
#include <stdio.h>
#include <ctype.h>

Macros

#define lockMEM()
 
#define unlockMEM()
 
#define DO_ABORT
 
#define ENABLE_NEW_DEBUG
 
#define BLOCK_ALIGNMENT   8 /* sizeof(double) */
 
#define MAX_CALL_DEPTH   16 /* must be multiple of BLOCK_ALIGNMENT */
 
#define POOL_SIZE   (12 * 1024 * 1024) /* number of words in the pool */
 
#define MAX_RANGES   12
 
#define REC_LENGTH   0
 
#define REC_BYTES   1
 
#define REC_NEXT   2
 
#define REC_TIME   3
 
#define REC_ALLOC_NEXT   4
 
#define REC_ALLOC_PREV   5
 
#define REC_ALLOC_LINENUM   6
 
#define REC_ALLOC_FILENAME   (REC_ALLOC_LINENUM + MAX_CALL_DEPTH)
 
#define REC_SIGNATURE   (REC_ALLOC_FILENAME + MAX_CALL_DEPTH)
 
#define WORDS_IN_RECORD   (8 + (2 * (MAX_CALL_DEPTH)))
 

Functions

void dump_malloc_blocks (int age, int resetDumpTime)
 
void mallocStopPoint ()
 
void trap_bad_assert ()
 
void set_malloc_dump_time (unsigned long t, int blockSizeLimit)
 
char * malloc (unsigned int bytes)
 
void free (char *block)
 
char * realloc (char *block, unsigned int size)
 
char * calloc (unsigned int nelem, unsigned int elsize)
 

Variables

int trace_malloc = 0
 
int newCallSP
 
int newCallLine [MAX_CALL_DEPTH]
 
char * newCallFile [MAX_CALL_DEPTH]
 

Macro Definition Documentation

◆ BLOCK_ALIGNMENT

#define BLOCK_ALIGNMENT   8 /* sizeof(double) */

◆ DO_ABORT

#define DO_ABORT

◆ ENABLE_NEW_DEBUG

#define ENABLE_NEW_DEBUG

◆ lockMEM

void lockMEM ( )

◆ MAX_CALL_DEPTH

#define MAX_CALL_DEPTH   16 /* must be multiple of BLOCK_ALIGNMENT */

◆ MAX_RANGES

#define MAX_RANGES   12

◆ POOL_SIZE

#define POOL_SIZE   (12 * 1024 * 1024) /* number of words in the pool */

◆ REC_ALLOC_FILENAME

#define REC_ALLOC_FILENAME   (REC_ALLOC_LINENUM + MAX_CALL_DEPTH)

◆ REC_ALLOC_LINENUM

#define REC_ALLOC_LINENUM   6

◆ REC_ALLOC_NEXT

#define REC_ALLOC_NEXT   4

◆ REC_ALLOC_PREV

#define REC_ALLOC_PREV   5

◆ REC_BYTES

#define REC_BYTES   1

◆ REC_LENGTH

#define REC_LENGTH   0

◆ REC_NEXT

#define REC_NEXT   2

◆ REC_SIGNATURE

#define REC_SIGNATURE   (REC_ALLOC_FILENAME + MAX_CALL_DEPTH)

◆ REC_TIME

#define REC_TIME   3

◆ unlockMEM

void unlockMEM ( )

◆ WORDS_IN_RECORD

#define WORDS_IN_RECORD   (8 + (2 * (MAX_CALL_DEPTH)))

Function Documentation

◆ calloc()

char* calloc ( unsigned int  nelem,
unsigned int  elsize 
)

References stderr, and trace_malloc.

◆ dump_malloc_blocks()

void dump_malloc_blocks ( int  age,
int  resetDumpTime 
)

References MAX_RANGES, and stderr.

◆ free()

void free ( char *  block)

References stderr, and trace_malloc.

Referenced by demangleEncodedTypeName().

◆ malloc()

char* malloc ( unsigned int  bytes)

◆ mallocStopPoint()

void mallocStopPoint ( )

References stderr.

◆ realloc()

char* realloc ( char *  block,
unsigned int  size 
)

References stderr, and trace_malloc.

◆ set_malloc_dump_time()

void set_malloc_dump_time ( unsigned long  t,
int  blockSizeLimit 
)

◆ trap_bad_assert()

void trap_bad_assert ( )

References stderr.

Variable Documentation

◆ newCallFile

char* newCallFile[MAX_CALL_DEPTH]

Referenced by malloc().

◆ newCallLine

int newCallLine[MAX_CALL_DEPTH]

Referenced by malloc().

◆ newCallSP

int newCallSP

Referenced by malloc().

◆ trace_malloc

int trace_malloc = 0

Referenced by calloc(), free(), malloc(), and realloc().

Generated: Fri Jul 31 2020 18:19:16
Support Information