summaryrefslogtreecommitdiff
path: root/allocator.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2019-11-10 14:57:13 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2019-11-10 14:57:13 -0500
commite800a25fd2c4945b465b4cd90b4d212272d1641c (patch)
treea1bbba056171c9f3c74e02fac000f0992f84d27f /allocator.c
parent45b3f700400c6e62dfb67ac08c1264e24f59e118 (diff)
added hash table test & fixed bugs there
Diffstat (limited to 'allocator.c')
-rw-r--r--allocator.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/allocator.c b/allocator.c
index 14b1a40..ce880a8 100644
--- a/allocator.c
+++ b/allocator.c
@@ -63,6 +63,19 @@ static void *allocr_realloc(Allocator *a, void *data, size_t old_size, size_t ne
#endif
}
+static void allocr_free(Allocator *a, void *data, size_t size) {
+#if NO_ALLOCATOR
+ (void)a;
+ (void)size;
+ free(data);
+#else
+ /* OPTIM */
+ (void)a;
+ (void)size;
+ (void)data;
+#endif
+}
+
static void allocr_free_all(Allocator *a) {
for (Page *page = a->first; page;) {
Page *next = page->next;