shithub: tinygl

ref: ebb784911c15f0a5b7ed1d61be7052a5b476f8e7
dir: /src/memory.c/

View raw version
/*
 * Memory allocator for TinyGL
 */

#if TGL_FEATURE_CUSTOM_MALLOC == 1
#include "zgl.h"

/* modify these functions so that they suit your needs */

#include <string.h>
void gl_free(void* p) { free(p); }

void* gl_malloc(GLint size) { return malloc(size); }

void* gl_zalloc(GLint size) { return calloc(1, size); }
#endif