aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorDouglas B. Rumbaugh <doug@douglasrumbaugh.com>2025-11-02 16:08:52 -0500
committerDouglas B. Rumbaugh <doug@douglasrumbaugh.com>2025-11-02 16:08:52 -0500
commit2347c038520bc3dc6f3990a6b088d4aa8fd17c7a (patch)
tree59e894486861ac13197dd26fdbcfa4ac8a337876 /src/alloc.c
parent5d8131a4240e4dab0e519bd3e29e3cabf5f09672 (diff)
downloadliballoc-2347c038520bc3dc6f3990a6b088d4aa8fd17c7a.tar.gz
free_list: partial split implementation
Implemented enough of split to get basic free list reuse working. Also updated the allocate() function to return the output of split when it is called.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/alloc.c b/src/alloc.c
index dd1c8aa..3f805db 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -53,7 +53,7 @@ void *allocate(size_t size) {
/* first check for a suitable memory block on the free list */
free_nd *nd = fl_find_first_fit(free_list, size);
if (nd) {
- void *return_region = fl_split_node(&free_list, nd, size);
+ return fl_split_node(&free_list, nd, size);
}
/*