C Cross Referencing & Documentation tool. Version 1.5.
Memory management functions
The size of each of the heap allocations
#define HEAP_INC 8192
The size of a string that is large enough to have it's own mallocation.
| struct _Heap | |
| { | |
| char* mem; | The memory that is private to the heap. |
| Heap next; | The next Heap structure. |
| } |
| Used in: | TidyMemory() |
| add_to_heap() |
heap_left
the amount of space left in the current heap segment.
| Used in: | TidyMemory() |
| get_space() |
char* ConcatStrings ( int n, char* s, ... )
| Prototyped in: | memory.h | |
| Calls: | get_space() | memory.c |
| strcpy(), strlen() | ||
| Called by: | ParseConfigFile() | cxref.c |
| SplitComment() | comment.c | |
| yylex() | parse-lex.c | |
| yyparse() | parse-yacc.c | |
void PrintMemoryStatistics ( void )
| Prototyped in: | memory.h | |
| Called by: | main() | cxref.c |
void* SafeCalloc ( unsigned int n, unsigned int size, char* file, int line )
| Prototyped in: | memory.h | |
| Calls: | calloc(), printf() | |
| Called by: | NewDefineType() | preproc.c |
| NewFile() | file.c | |
| NewFunctionType() | func.c | |
| NewIncludeType() | preproc.c | |
| NewStringList() | slist.c | |
| NewStringList2() | slist.c | |
| NewStructUnionType() | type.c | |
| NewTypedefType() | type.c | |
| NewVariableType() | var.c | |
void SafeFree ( void* ptr, char* file, int line )
void* SafeMalloc ( unsigned int size, char* file, int line )
char* SafeMallocString ( char* x, char* file, int line )
void* SafeRealloc ( void* ptr, unsigned int size, char* file, int line )
| Prototyped in: | memory.h | |
| Calls: | SafeFree() | memory.c |
| Called by: | main() | cxref.c |
| References Variables: | first | memory.c |
| heap_left | memory.c | |
static Heap add_to_heap ( unsigned int l )
| Prototyped in: | memory.c | |
| Calls: | SafeMalloc() | memory.c |
| Called by: | get_space() | memory.c |
| References Variables: | first | memory.c |
static char* get_space ( unsigned int l )
| Prototyped in: | memory.c | |
| Calls: | add_to_heap() | memory.c |
| Called by: | ConcatStrings() | memory.c |
| CopyString() | memory.c | |
| References Variables: | heap_left | memory.c |