Go to the documentation of this file.
86 #ifndef _LIBUTIL_CKD_ALLOC_H_
87 #define _LIBUTIL_CKD_ALLOC_H_
93 #include <sphinxbase/sphinxbase_export.h>
143 void *__ckd_calloc__(
size_t n_elem,
size_t elem_size,
144 const char *caller_file,
int caller_line);
147 void *__ckd_malloc__(
size_t size,
148 const char *caller_file,
int caller_line);
151 void *__ckd_realloc__(
void *ptr,
size_t new_size,
152 const char *caller_file,
int caller_line);
160 const char *caller_file,
int caller_line);
169 const char *caller_file,
int caller_line);
178 const char *caller_file,
int caller_line);
248 #define ckd_calloc(n,sz) __ckd_calloc__((n),(sz),__FILE__,__LINE__)
253 #define ckd_malloc(sz) __ckd_malloc__((sz),__FILE__,__LINE__)
258 #define ckd_realloc(ptr,sz) __ckd_realloc__(ptr,(sz),__FILE__,__LINE__)
264 #define ckd_salloc(ptr) __ckd_salloc__(ptr,__FILE__,__LINE__)
270 #define ckd_calloc_2d(d1,d2,sz) __ckd_calloc_2d__((d1),(d2),(sz),__FILE__,__LINE__)
276 #define ckd_calloc_3d(d1,d2,d3,sz) __ckd_calloc_3d__((d1),(d2),(d3),(sz),__FILE__,__LINE__)
281 #define ckd_calloc_4d(d1, d2, d3, d4, s) __ckd_calloc_4d__((d1), (d2), (d3), (d4), (s), __FILE__, __LINE__)
287 #define ckd_alloc_2d_ptr(d1, d2, bf, sz) __ckd_alloc_2d_ptr((d1), (d2), (bf), (sz), __FILE__, __LINE__)
292 #define ckd_free_2d_ptr(bf) ckd_free(bf)
298 #define ckd_alloc_3d_ptr(d1, d2, d3, bf, sz) __ckd_alloc_3d_ptr((d1), (d2), (d3), (bf), (sz), __FILE__, __LINE__)
303 #define ckd_free_3d_ptr(bf) ckd_free_2d(bf)