--- deliantra/server/include/util.h 2007/01/19 22:47:57 1.35 +++ deliantra/server/include/util.h 2007/01/25 03:54:45 1.36 @@ -1,6 +1,8 @@ #ifndef UTIL_H__ #define UTIL_H__ +//#define PREFER_MALLOC + #if __GNUC__ >= 3 # define is_constant(c) __builtin_constant_p (c) #else @@ -135,7 +137,11 @@ template inline void sfree (T *ptr, int n = 1) throw () { +#ifdef PREFER_MALLOC + free (ptr); +#else g_slice_free1 (n * sizeof (T), (void *)ptr); +#endif } // a STL-compatible allocator that uses g_slice