zlibWrapper: added support for custom memory allocation functions

This commit is contained in:
inikep committed 2016-06-02 16:52:36 +02:00
1 parent c4807f4d2f
commit ff9114aee3
5 files changed
+46 -12

No files matched your search

+4 -1
View File
@@ -62,11 +62,14 @@ void *myalloc(q, n, m)
unsigned n, m;
{
q = Z_NULL;
return calloc(n, m);
void *buf = calloc(n, m);
/* printf("myalloc %p n=%d m=%d\n", buf, n, m); */
return buf;
}
void myfree(void *q, void *p)
{
/* printf("myfree %p\n", p); */
q = Z_NULL;
free(p);
}