58 #define alloc_special_clean(x) (x)->id = 0;
60 #define alloc_special_next(x) ((alloc_special_type*)((x)->entry.overflow_next))
62 #define alloc_set_special_next(x, y) \
63 ((x)->entry.overflow_next) = (struct lruhash_entry*)(y);
66 #define ALLOC_SPECIAL_MAX 10
187 #ifdef UNBOUND_ALLOC_LITE
188 # include <sldns/ldns.h>
189 # include <sldns/packet.h>
190 # ifdef HAVE_OPENSSL_SSL_H
191 # include <openssl/ssl.h>
193 # define malloc(s) unbound_stat_malloc_lite(s, __FILE__, __LINE__, __func__)
194 # define calloc(n,s) unbound_stat_calloc_lite(n, s, __FILE__, __LINE__, __func__)
195 # define free(p) unbound_stat_free_lite(p, __FILE__, __LINE__, __func__)
196 # define realloc(p,s) unbound_stat_realloc_lite(p, s, __FILE__, __LINE__, __func__)
197 void *unbound_stat_malloc_lite(
size_t size,
const char* file,
int line,
199 void *unbound_stat_calloc_lite(
size_t nmemb,
size_t size,
const char* file,
200 int line,
const char* func);
201 void unbound_stat_free_lite(
void *ptr,
const char* file,
int line,
203 void *unbound_stat_realloc_lite(
void *ptr,
size_t size,
const char* file,
204 int line,
const char* func);
208 # define strdup(s) unbound_strdup_lite(s, __FILE__, __LINE__, __func__)
209 char* unbound_strdup_lite(
const char* s,
const char* file,
int line,
211 char* unbound_lite_wrapstr(
char* s);
212 # define sldns_rr2str(rr) unbound_lite_wrapstr(sldns_rr2str(rr))
213 # define sldns_rdf2str(rdf) unbound_lite_wrapstr(sldns_rdf2str(rdf))
214 # define sldns_rr_type2str(t) unbound_lite_wrapstr(sldns_rr_type2str(t))
215 # define sldns_rr_class2str(c) unbound_lite_wrapstr(sldns_rr_class2str(c))
216 # define sldns_rr_list2str(r) unbound_lite_wrapstr(sldns_rr_list2str(r))
217 # define sldns_pkt2str(p) unbound_lite_wrapstr(sldns_pkt2str(p))
218 # define sldns_pkt_rcode2str(r) unbound_lite_wrapstr(sldns_pkt_rcode2str(r))
219 # define sldns_pkt2wire(a, r, s) unbound_lite_pkt2wire(a, r, s)
220 sldns_status unbound_lite_pkt2wire(
uint8_t **
dest,
const sldns_pkt *p,
size_t *size);
221 # define i2d_DSA_SIG(d, s) unbound_lite_i2d_DSA_SIG(d, s)
222 int unbound_lite_i2d_DSA_SIG(DSA_SIG* dsasig,
unsigned char** sig);
size_t alloc_get_mem(struct alloc_cache *alloc)
void alloc_init(struct alloc_cache *alloc, struct alloc_cache *super, int thread_num)
alloc_special_type * alloc_special_obtain(struct alloc_cache *alloc)
void alloc_clear(struct alloc_cache *alloc)
void alloc_stats(struct alloc_cache *alloc)
void alloc_reg_release(struct alloc_cache *alloc, struct regional *r)
void alloc_special_release(struct alloc_cache *alloc, alloc_special_type *mem)
struct regional * alloc_reg_obtain(struct alloc_cache *alloc)
void alloc_clear_special(struct alloc_cache *alloc)
void alloc_set_id_cleanup(struct alloc_cache *alloc, void(*cleanup)(void *), void *arg)
uint64_t alloc_get_id(struct alloc_cache *alloc)
CXA_THROW_INFO_T void(* dest)(void *))
unsigned __int64 uint64_t
struct alloc_cache * super
struct regional * reg_list
alloc_special_type * quar