summaryrefslogtreecommitdiff
path: root/src/lib/memory.c
diff options
context:
space:
mode:
authorpeter <peter@pmikkelsen.com>2026-08-30 14:46:38 +0000
committerpeter <peter@pmikkelsen.com>2026-08-30 14:46:38 +0000
commit04827577ea502a9f0edc69e00e008751c8119cbc (patch)
treee09a4f12628b85c4bc3713b00bb0bf8bb5291400 /src/lib/memory.c
parent2261ffa04ddf30a7c8eae6e64129b293fc8bffd9 (diff)
Remove a lot of functions for manually freeing memory (they were not implemented)
FossilOrigin-Name: 693765728e62a74a0ab15d657f7d1dd83702a9371fb042dafe6250f84a252959
Diffstat (limited to 'src/lib/memory.c')
-rw-r--r--src/lib/memory.c51
1 files changed, 9 insertions, 42 deletions
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);
-}