Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

alloc.h File Reference

#include <iostream.h>
#include <stdlib.h>

Go to the source code of this file.

Defines

#define GLOBAL_VAR_FOR_ALLOCATION   my_memory_allocated
#define GLOBAL_VAR_FOR_DELETION   my_memory_deleted
#define IS_ZERO(x)   (fabs(x) < 1.0e-8)

Functions

void print_malloc (char *filename, int lineno, int mem_size)
void fatal_malloc (char *filename, int lineno, int mem_size)
void myprintf (char *fmt,...)
double TotalMemoryAllocated ()
double TotalMemoryDeleted ()
double TotalMemoryConsumed ()
template<class Etype> void MY_MALLOC (Etype **ptr, int n=1)
template<class Etype> void ALLOC1D (Etype **ptr, int m=1)
template<class Etype> void ALLOC2D (Etype ***ptr, int m, int n)
template<class Etype> void ALLOC3D (Etype ****ptr, int m, int n, int o)
template<class Etype> void ALLOC4D (Etype *****ptr, int m, int n, int o, int p)
template<class Etype> void FREE1D (Etype **ptr, int m=1)
template<class Etype> void FREE2D (Etype ***ptr, int m, int n)
template<class Etype> void FREE3D (Etype ****ptr, int m, int n, int o)
template<class Etype> void FREE4D (Etype *****ptr, int m, int n, int o, int p)

Variables

double mem_consumed


Define Documentation

#define GLOBAL_VAR_FOR_ALLOCATION   my_memory_allocated
 

Definition at line 14 of file alloc.h.

Referenced by ALLOC1D(), ALLOC2D(), ALLOC3D(), ALLOC4D(), MY_MALLOC(), TotalMemoryAllocated(), and TotalMemoryConsumed().

#define GLOBAL_VAR_FOR_DELETION   my_memory_deleted
 

Definition at line 15 of file alloc.h.

Referenced by FREE1D(), FREE2D(), FREE3D(), FREE4D(), TotalMemoryConsumed(), and TotalMemoryDeleted().

#define IS_ZERO      (fabs(x) < 1.0e-8)
 

Definition at line 21 of file alloc.h.


Function Documentation

template<class Etype>
void ALLOC1D Etype **    ptr,
int    m = 1
[inline]
 

Definition at line 56 of file alloc.h.

References GLOBAL_VAR_FOR_ALLOCATION.

Referenced by ALLOC2D(), packStruct(), RemoteSocket::RecvArray1D(), RemoteSocket::RecvArray2D(), RemoteSocket::RecvArray3D(), RemoteSocket::RecvArray4D(), RemoteSocket::RecvFile(), RemoteSocket::SendArray1D(), RemoteSocket::SendArray2D(), RemoteSocket::SendArray3D(), RemoteSocket::SendArray4D(), RemoteSocket::SendArrayGeneric(), RemoteSocket::SendFile(), and DataServerMPI::Start().

template<class Etype>
void ALLOC2D Etype ***    ptr,
int    m,
int    n
[inline]
 

Definition at line 80 of file alloc.h.

References ALLOC1D(), and GLOBAL_VAR_FOR_ALLOCATION.

Referenced by ALLOC3D().

template<class Etype>
void ALLOC3D Etype ****    ptr,
int    m,
int    n,
int    o
[inline]
 

Definition at line 99 of file alloc.h.

References ALLOC2D(), and GLOBAL_VAR_FOR_ALLOCATION.

Referenced by ALLOC4D().

template<class Etype>
void ALLOC4D Etype *****    ptr,
int    m,
int    n,
int    o,
int    p
[inline]
 

Definition at line 118 of file alloc.h.

References ALLOC3D(), and GLOBAL_VAR_FOR_ALLOCATION.

void fatal_malloc char *    filename,
int    lineno,
int    mem_size
 

template<class Etype>
void FREE1D Etype **    ptr,
int    m = 1
[inline]
 

Definition at line 137 of file alloc.h.

References GLOBAL_VAR_FOR_DELETION.

Referenced by FREE2D(), RemoteSocket::RecvArray1D(), RemoteSocket::RecvArray2D(), RemoteSocket::RecvArray3D(), RemoteSocket::RecvArray4D(), RemoteSocket::RecvFile(), RemoteSocket::SendArray1D(), RemoteSocket::SendArray2D(), RemoteSocket::SendArray3D(), RemoteSocket::SendArray4D(), RemoteSocket::SendArrayGeneric(), RemoteSocket::SendFile(), and DataServerMPI::Start().

template<class Etype>
void FREE2D Etype ***    ptr,
int    m,
int    n
[inline]
 

Definition at line 149 of file alloc.h.

References FREE1D(), and GLOBAL_VAR_FOR_DELETION.

Referenced by FREE3D().

template<class Etype>
void FREE3D Etype ****    ptr,
int    m,
int    n,
int    o
[inline]
 

Definition at line 164 of file alloc.h.

References FREE2D(), and GLOBAL_VAR_FOR_DELETION.

Referenced by FREE4D().

template<class Etype>
void FREE4D Etype *****    ptr,
int    m,
int    n,
int    o,
int    p
[inline]
 

Definition at line 179 of file alloc.h.

References FREE3D(), and GLOBAL_VAR_FOR_DELETION.

template<class Etype>
void MY_MALLOC Etype **    ptr,
int    n = 1
[inline]
 

Definition at line 40 of file alloc.h.

References GLOBAL_VAR_FOR_ALLOCATION.

void myprintf char *    fmt,
...   
 

void print_malloc char *    filename,
int    lineno,
int    mem_size
 

double TotalMemoryAllocated   [inline]
 

Definition at line 24 of file alloc.h.

References GLOBAL_VAR_FOR_ALLOCATION.

double TotalMemoryConsumed   [inline]
 

Definition at line 34 of file alloc.h.

References GLOBAL_VAR_FOR_ALLOCATION, and GLOBAL_VAR_FOR_DELETION.

double TotalMemoryDeleted   [inline]
 

Definition at line 29 of file alloc.h.

References GLOBAL_VAR_FOR_DELETION.


Variable Documentation

double mem_consumed
 

Definition at line 11 of file alloc.h.


Generated on Sun Jun 16 17:36:50 2002 for POSSE: Portable Object-oriented Scientific Steering Environment by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001