--- deliantra/server/include/util.h 2007/12/16 02:50:33 1.59 +++ deliantra/server/include/util.h 2008/01/22 15:53:01 1.60 @@ -23,6 +23,7 @@ #define UTIL_H__ //#define PREFER_MALLOC +#define DEBUG_SALLOC #if __GNUC__ >= 3 # define is_constant(c) __builtin_constant_p (c) @@ -54,6 +55,15 @@ #include #include +#ifdef DEBUG_SALLOC +# define g_slice_alloc0(s) debug_slice_alloc0(s) +# define g_slice_alloc(s) debug_slice_alloc(s) +# define g_slice_free1(s,p) debug_slice_free1(s,p) +void *g_slice_alloc (unsigned long size); +void *g_slice_alloc0 (unsigned long size); +void g_slice_free1 (unsigned long size, void *ptr); +#endif + // use C0X decltype for auto declarations until ISO C++ sanctifies them (if ever) #define auto(var,expr) decltype(expr) var = (expr)