2006-05-16 14:52:36 +00:00
|
|
|
|
|
|
|
// Memory allocator for TinyGL
|
|
|
|
|
2008-01-26 11:47:23 +00:00
|
|
|
#include "engine/tinygl/zgl.h"
|
2005-01-12 15:20:02 +00:00
|
|
|
|
2006-05-16 14:52:36 +00:00
|
|
|
// modify these functions so that they suit your needs
|
2005-01-12 15:20:02 +00:00
|
|
|
|
2006-05-16 14:52:36 +00:00
|
|
|
void gl_free(void *p) {
|
2005-01-12 15:20:02 +00:00
|
|
|
free(p);
|
|
|
|
}
|
|
|
|
|
2006-05-16 14:52:36 +00:00
|
|
|
void *gl_malloc(int size) {
|
2005-01-12 15:20:02 +00:00
|
|
|
return malloc(size);
|
|
|
|
}
|
|
|
|
|
2006-05-16 14:52:36 +00:00
|
|
|
void *gl_zalloc(int size) {
|
2005-01-12 15:20:02 +00:00
|
|
|
return calloc(1, size);
|
|
|
|
}
|