spmalloc.h File Reference

#include <stdlib.h>
#include "MALLOC.h"

Include dependency graph for spmalloc.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define SPMALLOC(x)   MALLOC(((size_t) x))
#define SPALLOC(type, number)   ((type *)SPMALLOC((unsigned)(sizeof(type)*(number))))
#define SPREALLOC(ptr, type, number)   ptr = (type *)REALLOC((char *)ptr,(unsigned)(sizeof(type)*(number)))
#define SPFREE(ptr)   { if ((ptr) != NULL) {FREE((void *)(ptr)); (ptr) = NULL;}}
#define SPCALLOC(ptr, type, number)


Define Documentation

#define SPALLOC ( type,
number   )     ((type *)SPMALLOC((unsigned)(sizeof(type)*(number))))

Definition at line 7 of file spmalloc.h.

Referenced by AllocateBlockOfAllocationList(), CreateInternalVectors(), InitializeElementBlocks(), spcGetElement(), spcGetFillin(), and spCreate().

#define SPCALLOC ( ptr,
type,
number   ) 

Value:

{   int i; ptr = SPALLOC(type, number);                   \
    if (ptr != (type *)NULL)                            \
        for(i=(number)-1;i>=0; i--) ptr[i] = (type) 0;  \
}

Definition at line 15 of file spmalloc.h.

Referenced by spCreate().

#define SPFREE ( ptr   )     { if ((ptr) != NULL) {FREE((void *)(ptr)); (ptr) = NULL;}}

Definition at line 11 of file spmalloc.h.

Referenced by EnlargeMatrix(), RecordAllocation(), and spDestroy().

#define SPMALLOC ( x   )     MALLOC(((size_t) x))

Definition at line 6 of file spmalloc.h.

#define SPREALLOC ( ptr,
type,
number   )     ptr = (type *)REALLOC((char *)ptr,(unsigned)(sizeof(type)*(number)))

Definition at line 8 of file spmalloc.h.

Referenced by EnlargeMatrix().


Generated on Sun Mar 4 16:12:45 2007 for Scilab [trunk] by  doxygen 1.5.1