comparison dbmalloc.h @ 1365:9aa6cd66b51d fuzz

zlib can use m_malloc/m_free too
author Matt Johnston <matt@ucc.asn.au>
date Mon, 22 May 2017 22:09:26 +0800
parents f9f930e1a516
children 7209a6e30932
comparison
equal deleted inserted replaced
1364:17104db7928c 1365:9aa6cd66b51d
2 #define DBMALLOC_H_ 2 #define DBMALLOC_H_
3 3
4 #include "includes.h" 4 #include "includes.h"
5 5
6 void * m_malloc(size_t size); 6 void * m_malloc(size_t size);
7 /* m_calloc is limited in size, enough for libtomcrypt */
8 void * m_calloc(size_t nmemb, size_t size); 7 void * m_calloc(size_t nmemb, size_t size);
9 void * m_strdup(const char * str); 8 void * m_strdup(const char * str);
10 void * m_realloc(void* ptr, size_t size); 9 void * m_realloc(void* ptr, size_t size);
11 void m_free_direct(void* ptr); 10 void m_free_direct(void* ptr);
12 #define m_free(X) do {m_free_direct(X); (X) = NULL;} while (0) 11 #define m_free(X) do {m_free_direct(X); (X) = NULL;} while (0)