sexp_memory.h

Go to the documentation of this file.
00001 
00037 #ifndef __SEXP_MEMORY_H__
00038 #define __SEXP_MEMORY_H__
00039 
00051 #ifdef _SEXP_LIMIT_MEMORY_
00052 
00053 #ifdef __cplusplus
00054 extern "C" {
00055 #endif
00056 
00070   void *sexp_malloc(size_t size);
00071 
00081   void *sexp_calloc(size_t count, size_t size);
00082 
00089   void sexp_free(void *ptr, size_t size);
00090 
00103   void *sexp_realloc(void *ptr, size_t size, size_t oldsize);
00104 
00110   size_t get_sexp_max_memory();
00111 
00116   size_t get_sexp_used_memory();
00117 
00126   int set_sexp_max_memory(size_t newsize);
00127 
00128 #ifdef __cplusplus
00129 }
00130 #endif
00131 
00132 #else
00133 
00138 #define sexp_calloc(count,size) calloc(count,size)
00139 
00144 #define sexp_malloc(size) malloc(size)
00145 
00150 #define sexp_free(ptr,size) free(ptr)
00151 
00156 #define sexp_realloc(ptr,size,oldsize) realloc((ptr),(size))
00157 
00158 #endif
00159 
00160 #endif /* __SEXP_MEMORY_H__ */

Generated on Thu Oct 25 01:19:37 2007 for Small, Fast S-Expression Library by  doxygen 1.4.6