19#undef SP_USE_MAC_MEMORY
26extern void spSetMemoryErrorExit(
int flag);
71#if defined(_WIN32) && defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
72#define xspAlloc(n, type) (type *)malloc((int)(n)*sizeof(type))
73#define xspRealloc(p, n, type) (type *)realloc((char *)(p), (int)(n)*sizeof(type))
74#define xspFree(p) {free((char *)(p)); (p) = NULL;}
75#define xspStrClone(p) _strdup(p)
78#define xspAlloc(n, type) (type *)xspMalloc((int)(n)*sizeof(type))
80#define xspRealloc(p, n, type) (type *)xspRemalloc((char *)(p), (int)(n)*sizeof(type))
82#define xspFree(p) {_xspFree((char *)(p)); (p) = NULL;}
85#define spStrReplace(s1, s2) {if ((s1) != NULL) xspFree(s1); (s1) = (((s2) != NULL) ? xspStrClone(s2) : NULL);}
87#define spArrayCopy(p1, p2, n, type) memmove((char *)(p1), (char *)(p2), (unsigned)(n)*sizeof(type))
89#if !defined(SP_DISABLE_ABBREVIATION)
91#define xalloc(n, type) xspAlloc(n, type)
94#define xrealloc(p, n, type) xspRealloc(p, n, type)
97#define xfree(p) xspFree(p)
101#define strclone(string) xspStrClone(string)
104#define strrepl(s1, s2) spStrReplace(s1, s2)
107#define arrcpy(p1, p2, n, type) spArrayCopy(p1, p2, n, type)
float ** xspFMatAlloc(int row, int col)
void xspUCMatFree(unsigned char **mat, int row)
void xspIMatFree(int **mat, int row)
char * xspStrClone(const char *string)
void xspCMatFree(char **mat, int row)
void xspDMatFree(double **mat, int row)
long ** xspLMatAlloc(int row, int col)
double ** xspDMatAlloc(int row, int col)
short ** xspSMatAlloc(int row, int col)
void xspLMatFree(long **mat, int row)
void xspSMatFree(short **mat, int row)
char * xspRemalloc(char *p, int nbytes)
unsigned char ** xspUCMatAlloc(int row, int col)
char * xspMalloc(int nbytes)
void xspFMatFree(float **mat, int row)
char ** xspCMatAlloc(int row, int col)
int ** xspIMatAlloc(int row, int col)