From 4187bbd8bf03428319ebd32ed058a3ab22213318 Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 10 Jul 2008 22:48:16 +0000 Subject: [PATCH] proper mem accounting --- panda/src/tinydisplay/memory.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/panda/src/tinydisplay/memory.cxx b/panda/src/tinydisplay/memory.cxx index e1dc3cbb30..38b142d0db 100644 --- a/panda/src/tinydisplay/memory.cxx +++ b/panda/src/tinydisplay/memory.cxx @@ -2,20 +2,23 @@ * Memory allocator for TinyGL */ #include "zgl.h" +#include "memoryHook.h" /* modify these functions so that they suit your needs */ void gl_free(void *p) { - free(p); + PANDA_FREE_ARRAY(p); } void *gl_malloc(int size) { - return malloc(size); + return PANDA_MALLOC_ARRAY(size); } void *gl_zalloc(int size) { - return calloc(1, size); + void *buffer = PANDA_MALLOC_ARRAY(size); + memset(buffer, 0, size); + return buffer; }