00001 /* 00002 * Memory allocator for TinyGL 00003 */ 00004 #include "zgl.h" 00005 #include "memoryHook.h" 00006 00007 /* modify these functions so that they suit your needs */ 00008 00009 void gl_free(void *p) 00010 { 00011 PANDA_FREE_ARRAY(p); 00012 } 00013 00014 void *gl_malloc(int size) 00015 { 00016 return PANDA_MALLOC_ARRAY(size); 00017 } 00018 00019 void *gl_zalloc(int size) 00020 { 00021 void *buffer = PANDA_MALLOC_ARRAY(size); 00022 memset(buffer, 0, size); 00023 return buffer; 00024 }