ARB
Macros | Functions
mem.h File Reference
#include <stdlib.h>
Include dependency graph for mem.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define newVector(n, s)   newBlock((n)*(s))
 
#define freeBlock(v)   freeBlock_((void **)(v))
 
#define newDoubleVector(n)   (double *)(newVector((size_t)(n),sizeof(double)))
 
#define newFloatVector(n)   (float *)(newVector((size_t)(n),sizeof(float)))
 
#define newShortVector(n)   (short *)(newVector((size_t)(n),sizeof(short)))
 
#define newLongVector(n)   (long *)(newVector((size_t)(n),sizeof(long)))
 
#define newIntVector(n)   (int *)(newVector((size_t)(n),sizeof(int)))
 
#define newCharVector(n)   (char *)(newVector((size_t)(n),sizeof(char)))
 
#define newDoubleMatrix(r, c)   (double **)(newMatrix((size_t)(r),(size_t)(c),sizeof(double)))
 
#define newFloatMatrix(r, c)   (float **)(newMatrix((size_t)(r),(size_t)(c),sizeof(float)))
 
#define newShortMatrix(r, c)   (short **)(newMatrix((size_t)(r),(size_t)(c),sizeof(short)))
 
#define newLongMatrix(r, c)   (long **)(newMatrix((size_t)(r),(size_t)(c),sizeof(long)))
 
#define newIntMatrix(r, c)   (int **)(newMatrix((size_t)(r),(size_t)(c),sizeof(int)))
 
#define newCharMatrix(r, c)   (char **)(newMatrix((size_t)(r),(size_t)(c),sizeof(char)))
 
#define freeMatrix(m)   freeMatrix_((void ***)(m))
 

Functions

void * newBlock (size_t s)
 
void freeBlock_ (void **v)
 
void ** newMatrix (size_t nrow, size_t ncol, size_t s)
 
void freeMatrix_ (void ***m)
 

Macro Definition Documentation

#define newVector (   n,
  s 
)    newBlock((n)*(s))

Definition at line 23 of file mem.h.

Referenced by Align(), and initTrnsprob().

#define freeBlock (   v)    freeBlock_((void **)(v))

Definition at line 25 of file mem.h.

Referenced by Align(), freeIsland(), freeMatrix_(), main(), and uninitTrnsprob().

#define newDoubleVector (   n)    (double *)(newVector((size_t)(n),sizeof(double)))

Definition at line 27 of file mem.h.

#define newFloatVector (   n)    (float *)(newVector((size_t)(n),sizeof(float)))

Definition at line 28 of file mem.h.

#define newShortVector (   n)    (short *)(newVector((size_t)(n),sizeof(short)))

Definition at line 29 of file mem.h.

#define newLongVector (   n)    (long *)(newVector((size_t)(n),sizeof(long)))

Definition at line 30 of file mem.h.

#define newIntVector (   n)    (int *)(newVector((size_t)(n),sizeof(int)))

Definition at line 31 of file mem.h.

#define newCharVector (   n)    (char *)(newVector((size_t)(n),sizeof(char)))

Definition at line 32 of file mem.h.

#define newDoubleMatrix (   r,
 
)    (double **)(newMatrix((size_t)(r),(size_t)(c),sizeof(double)))

Definition at line 34 of file mem.h.

Referenced by initEntropy(), and initScore().

#define newFloatMatrix (   r,
 
)    (float **)(newMatrix((size_t)(r),(size_t)(c),sizeof(float)))

Definition at line 35 of file mem.h.

#define newShortMatrix (   r,
 
)    (short **)(newMatrix((size_t)(r),(size_t)(c),sizeof(short)))

Definition at line 36 of file mem.h.

#define newLongMatrix (   r,
 
)    (long **)(newMatrix((size_t)(r),(size_t)(c),sizeof(long)))

Definition at line 37 of file mem.h.

#define newIntMatrix (   r,
 
)    (int **)(newMatrix((size_t)(r),(size_t)(c),sizeof(int)))

Definition at line 38 of file mem.h.

#define newCharMatrix (   r,
 
)    (char **)(newMatrix((size_t)(r),(size_t)(c),sizeof(char)))

Definition at line 39 of file mem.h.

#define freeMatrix (   m)    freeMatrix_((void ***)(m))

Definition at line 40 of file mem.h.

Referenced by Align(), uninitEntropy(), uninitScore(), and uninitTrnsprob().

Function Documentation

void* newBlock ( size_t  s)

Definition at line 39 of file mem.cxx.

References A, D, M, MINSIZE, NULp, and outOfMemory().

Referenced by Align(), newIsland(), and newMatrix().

void freeBlock_ ( void **  v)

Definition at line 63 of file mem.cxx.

References A, D, M, MINSIZE, NULp, and s.

void** newMatrix ( size_t  nrow,
size_t  ncol,
size_t  s 
)

Definition at line 87 of file mem.cxx.

References newBlock(), and s.

Referenced by Align(), and initTrnsprob().

void freeMatrix_ ( void ***  m)

Definition at line 100 of file mem.cxx.

References freeBlock.