Revision 7a2105be lib/resource.h

View differences:

lib/resource.h
43 43
/* Normal memory blocks */
44 44

  
45 45
void *mb_alloc(pool *, unsigned size);
46
void *mb_allocz(pool *, unsigned size);
46 47
void mb_free(void *);
47 48

  
48 49
/* Memory pools with linear allocation */
......
62 63
void *sl_alloc(slab *);
63 64
void sl_free(slab *, void *);
64 65

  
65
/* Low-level memory allocation functions, please don't use */
66
/*
67
 * Low-level memory allocation functions, please don't use
68
 * outside resource manager and possibly sysdep code.
69
 */
66 70

  
71
#ifdef HAVE_LIBDMALLOC
72
/*
73
 * The standard dmalloc macros tend to produce lots of namespace
74
 * conflicts and we use only xmalloc and xfree, so we can define
75
 * the stubs ourselves.
76
 */
77
#define DMALLOC_DISABLE
78
#include <dmalloc.h>
79
#define xmalloc(size) _xmalloc_leap(__FILE__, __LINE__, size)
80
#define xfree(ptr) _xfree_leap(__FILE__, __LINE__, ptr)
81
#else
67 82
void *xmalloc(unsigned);
68 83
#define xfree(x) free(x)
84
#endif
69 85

  
70 86
#endif

Also available in: Unified diff