mem/mem.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <malloc.h>
#include "mono.h"
#include "error.h"
#include "types.h"

Defines

#define FULL_MEM_CHECKING
#define CHECKSIZE   16
#define CHECKBYTE   0xFC
#define MAX_INDEX   10000

Functions

void mem_display_blocks (void)
void mem_init ()
void PrintInfo (int id)
void * mem_malloc (unsigned int size, char *var, char *filename, int line, int fill_zero)
int mem_find_id (void *buffer)
int mem_check_integrity (int block_number)
void * mem_realloc (void *ptr, unsigned int size, char *var, char *filename, int line, int fill_zero)
void mem_free (void *buffer)
void mem_validate_heap ()
void mem_print_all ()

Variables

static char * MallocBase [MAX_INDEX]
static unsigned int MallocSize [MAX_INDEX]
static unsigned int MallocRealSize [MAX_INDEX]
static unsigned int Signature [MAX_INDEX]
static unsigned char Present [MAX_INDEX]
static char * Filename [MAX_INDEX]
static char * Varname [MAX_INDEX]
static int Line [MAX_INDEX]
static int BytesMalloced = 0
static int MaxMalloced = 0
static unsigned int LastSignature = 0
static unsigned int SmallestAddress = 0xFFFFFFF
static unsigned int LargestAddress = 0x0
int show_mem_info = 0
static int free_list [MAX_INDEX]
static int num_blocks = 0
static int Initialized = 0
static int LargestIndex = 0
int out_of_memory = 0

Define Documentation

#define CHECKBYTE   0xFC
 

#define CHECKSIZE   16
 

#define FULL_MEM_CHECKING
 

#define MAX_INDEX   10000
 


Function Documentation

int mem_check_integrity int  block_number  ) 
 

void mem_display_blocks void   ) 
 

int mem_find_id void *  buffer  ) 
 

void mem_free void *  buffer  ) 
 

void mem_init  ) 
 

void* mem_malloc unsigned int  size,
char *  var,
char *  filename,
int  line,
int  fill_zero
 

void mem_print_all  ) 
 

void* mem_realloc void *  ptr,
unsigned int  size,
char *  var,
char *  filename,
int  line,
int  fill_zero
 

void mem_validate_heap  ) 
 

void PrintInfo int  id  ) 
 


Variable Documentation

int BytesMalloced = 0 [static]
 

char* Filename[MAX_INDEX] [static]
 

int free_list[MAX_INDEX] [static]
 

int Initialized = 0 [static]
 

unsigned int LargestAddress = 0x0 [static]
 

int LargestIndex = 0 [static]
 

unsigned int LastSignature = 0 [static]
 

int Line[MAX_INDEX] [static]
 

char* MallocBase[MAX_INDEX] [static]
 

unsigned int MallocRealSize[MAX_INDEX] [static]
 

unsigned int MallocSize[MAX_INDEX] [static]
 

int MaxMalloced = 0 [static]
 

int num_blocks = 0 [static]
 

int out_of_memory = 0
 

unsigned char Present[MAX_INDEX] [static]
 

int show_mem_info = 0
 

unsigned int Signature[MAX_INDEX] [static]
 

unsigned int SmallestAddress = 0xFFFFFFF [static]
 

char* Varname[MAX_INDEX] [static]
 


Generated on Mon Aug 28 20:55:34 2006 for D1X-Rebirth by  doxygen 1.4.6