ADMB Documentation  Fournier-pthread.1088
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines
Defines | Functions | Variables
safe_mem.h File Reference

(* $Id: safe_mem.h 418 2012-04-10 23:36:33Z arnima $)

Go to the source code of this file.

Defines

#define MEM_ABORTMSG   0
#define MEM_ABORT   1
#define MEM_RETNULL   2
#define MEM_CALLFP   3
#define MEM_RETRY   4
#define mem_scalloc   mem_calloc
#define mem_sfree(ptr, size)   mem_free(ptr)
#define mem_freefp   mem_free
#define mem_check()
#define mem_checkptr(p)

Functions

void mem_setexception (int,...)
char * mem_strdup (const char *)
void mem_checkptr (void *ptr)
void * mem_calloc (unsigned)
void * mem_malloc (unsigned)
void * mem_realloc (void *, unsigned)
void mem_free (void *)
void mem_init (void)
void mem_term (void)

Variables

int mem_inited

Define Documentation

#define MEM_ABORTMSG   0

Definition at line 86 of file safe_mem.h.

Referenced by mem_exception().

#define MEM_ABORT   1

Definition at line 87 of file safe_mem.h.

Referenced by mem_exception().

#define MEM_RETNULL   2

Definition at line 88 of file safe_mem.h.

Referenced by mem_exception().

#define MEM_CALLFP   3

Definition at line 89 of file safe_mem.h.

Referenced by mem_exception(), and mem_setexception().

#define MEM_RETRY   4

Definition at line 90 of file safe_mem.h.

Referenced by mem_exception(), and mem_setexception().

#define mem_scalloc   mem_calloc

Definition at line 196 of file safe_mem.h.

#define mem_sfree (   ptr,
  size 
)    mem_free(ptr)

Definition at line 209 of file safe_mem.h.

#define mem_freefp   mem_free

Definition at line 234 of file safe_mem.h.

void mem_check ( )

Definition at line 235 of file safe_mem.h.

#define mem_checkptr (   p)

Definition at line 236 of file safe_mem.h.


Function Documentation

void mem_setexception ( int  ,
  ... 
)
char* mem_strdup ( const char *  )

Definition at line 155 of file mem.cpp.

void mem_checkptr ( void *  ptr)
void* mem_calloc ( unsigned  )

Definition at line 548 of file mem.cpp.

void* mem_malloc ( unsigned  )

Definition at line 526 of file mem.cpp.

Referenced by mem_realloc(), and mem_strdup().

void* mem_realloc ( void *  ,
unsigned   
)

Definition at line 570 of file mem.cpp.

void mem_free ( void *  )

Definition at line 591 of file mem.cpp.

Referenced by mem_realloc().

void mem_init ( void  )

Definition at line 660 of file mem.cpp.

void mem_term ( void  )

Definition at line 680 of file mem.cpp.


Variable Documentation

Definition at line 57 of file mem.cpp.

Referenced by mem_init(), and mem_term().