ergo
memorymanag.cc File Reference

Memory allocation/deallocation routines. More...

#include <pthread.h>
#include <stdlib.h>
#include "memorymanag.h"
#include "output.h"

Functions

voidergo_malloc (size_t noOfBytes)
 
void ergo_free (void *p)
 
void report_memory_status ()
 

Variables

static double globalNoOfBytesAllocated = 0
 
static int globalMallocCount = 0
 
static int globalFreeCount = 0
 
static pthread_mutex_t globalMemStatLock = PTHREAD_MUTEX_INITIALIZER
 

Detailed Description

Memory allocation/deallocation routines.

Author
: Elias Rudberg responsible

Function Documentation

void report_memory_status ( void  )

Variable Documentation

int globalFreeCount = 0
static

Referenced by ergo_free(), and report_memory_status().

int globalMallocCount = 0
static
pthread_mutex_t globalMemStatLock = PTHREAD_MUTEX_INITIALIZER
static

Referenced by ergo_free(), and ergo_malloc().

double globalNoOfBytesAllocated = 0
static

Referenced by ergo_malloc().