summaryrefslogtreecommitdiff
path: root/main/heap.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/heap.c')
-rw-r--r--main/heap.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/main/heap.c b/main/heap.c
index 29f069b30..73280fedc 100644
--- a/main/heap.c
+++ b/main/heap.c
@@ -111,7 +111,7 @@ int ast_heap_verify(struct ast_heap *h)
return 0;
}
-#ifdef MALLOC_DEBUG
+#ifdef __AST_DEBUG_MALLOC
struct ast_heap *_ast_heap_create(unsigned int init_height, ast_heap_cmp_fn cmp_fn,
ssize_t index_offset, const char *file, int lineno, const char *func)
#else
@@ -131,7 +131,7 @@ struct ast_heap *ast_heap_create(unsigned int init_height, ast_heap_cmp_fn cmp_f
}
if (!(h =
-#ifdef MALLOC_DEBUG
+#ifdef __AST_DEBUG_MALLOC
__ast_calloc(1, sizeof(*h), file, lineno, func)
#else
ast_calloc(1, sizeof(*h))
@@ -145,7 +145,7 @@ struct ast_heap *ast_heap_create(unsigned int init_height, ast_heap_cmp_fn cmp_f
h->avail_len = (1 << init_height) - 1;
if (!(h->heap =
-#ifdef MALLOC_DEBUG
+#ifdef __AST_DEBUG_MALLOC
__ast_calloc(1, h->avail_len * sizeof(void *), file, lineno, func)
#else
ast_calloc(1, h->avail_len * sizeof(void *))
@@ -176,7 +176,7 @@ struct ast_heap *ast_heap_destroy(struct ast_heap *h)
* \brief Add a row of additional storage for the heap.
*/
static int grow_heap(struct ast_heap *h
-#ifdef MALLOC_DEBUG
+#ifdef __AST_DEBUG_MALLOC
, const char *file, int lineno, const char *func
#endif
)
@@ -184,7 +184,7 @@ static int grow_heap(struct ast_heap *h
void **new_heap;
size_t new_len = h->avail_len * 2 + 1;
-#ifdef MALLOC_DEBUG
+#ifdef __AST_DEBUG_MALLOC
new_heap = __ast_realloc(h->heap, new_len * sizeof(void *), file, lineno, func);
#else
new_heap = ast_realloc(h->heap, new_len * sizeof(void *));
@@ -244,14 +244,14 @@ static int bubble_up(struct ast_heap *h, int i)
return i;
}
-#ifdef MALLOC_DEBUG
+#ifdef __AST_DEBUG_MALLOC
int _ast_heap_push(struct ast_heap *h, void *elm, const char *file, int lineno, const char *func)
#else
int ast_heap_push(struct ast_heap *h, void *elm)
#endif
{
if (h->cur_len == h->avail_len && grow_heap(h
-#ifdef MALLOC_DEBUG
+#ifdef __AST_DEBUG_MALLOC
, file, lineno, func
#endif
)) {