MINOR: memory: remove macros
We finally get rid of the macros and use usual memory management
functions directly.
diff --git a/src/memory.c b/src/memory.c
index c1db4ff..9f8396d 100644
--- a/src/memory.c
+++ b/src/memory.c
@@ -81,7 +81,7 @@
}
if (!pool) {
- pool = CALLOC(1, sizeof(*pool));
+ pool = calloc(1, sizeof(*pool));
if (!pool)
return NULL;
if (name)
@@ -114,7 +114,7 @@
if (pool->limit && pool->allocated >= pool->limit)
return NULL;
- ptr = MALLOC(pool->size + POOL_EXTRA);
+ ptr = malloc(pool->size + POOL_EXTRA);
if (!ptr) {
pool->failed++;
if (failed)
@@ -151,7 +151,7 @@
temp = next;
next = *POOL_LINK(pool, temp);
pool->allocated--;
- FREE(temp);
+ free(temp);
}
pool->free_list = next;
@@ -180,7 +180,7 @@
temp = next;
next = *POOL_LINK(entry, temp);
entry->allocated--;
- FREE(temp);
+ free(temp);
}
entry->free_list = next;
}
@@ -204,7 +204,7 @@
pool->users--;
if (!pool->users) {
LIST_DEL(&pool->list);
- FREE(pool);
+ free(pool);
}
}
return NULL;