From 04827577ea502a9f0edc69e00e008751c8119cbc Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 30 Aug 2026 14:46:38 +0000 Subject: Remove a lot of functions for manually freeing memory (they were not implemented) FossilOrigin-Name: 693765728e62a74a0ab15d657f7d1dd83702a9371fb042dafe6250f84a252959 --- src/lib/memory.c | 51 +++++++++------------------------------------------ 1 file changed, 9 insertions(+), 42 deletions(-) (limited to 'src/lib/memory.c') diff --git a/src/lib/memory.c b/src/lib/memory.c index ca4babf..94f903c 100644 --- a/src/lib/memory.c +++ b/src/lib/memory.c @@ -38,6 +38,15 @@ alloc(struct aplwc *aplwc, size_t size, size_t align) return p; } +void +memory_free_root(struct aplwc *aplwc, void *p) +{ + if(NEVER(p == NULL)) + return; + + UNUSED_PARAMETER(aplwc); +} + struct aplwc * memory_alloc_aplwc(struct aplwc *aplwc) { @@ -47,13 +56,6 @@ memory_alloc_aplwc(struct aplwc *aplwc) return p; } -void -memory_free_aplwc(struct aplwc *aplwc, struct aplwc *p) -{ - UNUSED_PARAMETER(aplwc); - UNUSED_PARAMETER(p); -} - struct aplwc_line * memory_alloc_aplwc_line(struct aplwc *aplwc) { @@ -63,13 +65,6 @@ memory_alloc_aplwc_line(struct aplwc *aplwc) return p; } -void -memory_free_aplwc_line(struct aplwc *aplwc, struct aplwc_line *p) -{ - UNUSED_PARAMETER(aplwc); - UNUSED_PARAMETER(p); -} - struct string * memory_alloc_string(struct aplwc *aplwc, size_t bytes) { @@ -79,13 +74,6 @@ memory_alloc_string(struct aplwc *aplwc, size_t bytes) return p; } -void -memory_free_string(struct aplwc *aplwc, struct string *p) -{ - UNUSED_PARAMETER(aplwc); - UNUSED_PARAMETER(p); -} - struct token_list * memory_alloc_token_list(struct aplwc *aplwc, size_t tokens) { @@ -95,13 +83,6 @@ memory_alloc_token_list(struct aplwc *aplwc, size_t tokens) return p; } -void -memory_free_token_list(struct aplwc *aplwc, struct token_list *p) -{ - UNUSED_PARAMETER(aplwc); - UNUSED_PARAMETER(p); -} - struct aplwc_value * memory_alloc_aplwc_value(struct aplwc *aplwc) { @@ -111,13 +92,6 @@ memory_alloc_aplwc_value(struct aplwc *aplwc) return p; } -void -memory_free_aplwc_value(struct aplwc *aplwc, struct aplwc_value *p) -{ - UNUSED_PARAMETER(aplwc); - UNUSED_PARAMETER(p); -} - struct aplwc_module * memory_alloc_aplwc_module(struct aplwc *aplwc) { @@ -126,10 +100,3 @@ memory_alloc_aplwc_module(struct aplwc *aplwc) p = alloc(aplwc, sizeof(struct aplwc_module), alignof(struct aplwc_module)); return p; } - -void -memory_free_aplwc_module(struct aplwc *aplwc, struct aplwc_module *p) -{ - UNUSED_PARAMETER(aplwc); - UNUSED_PARAMETER(p); -} -- cgit v1.2.3