File indexing completed on 2024-04-14 14:11:09
0001 /* 0002 ** Author: Eric Veach, July 1994. 0003 ** 0004 */ 0005 0006 #include "memalloc.h" 0007 #include "string.h" 0008 0009 int __gl_memInit(size_t maxFast) 0010 { 0011 #ifndef NO_MALLOPT 0012 /* mallopt( M_MXFAST, maxFast );*/ 0013 #ifdef MEMORY_DEBUG 0014 mallopt(M_DEBUG, 1); 0015 #endif 0016 #endif 0017 return 1; 0018 } 0019 0020 #ifdef MEMORY_DEBUG 0021 void *__gl_memAlloc(size_t n) 0022 { 0023 return memset(malloc(n), 0xa5, n); 0024 } 0025 #endif