From c45a7d924b10d9cc69a48896f7a6c99ecbf56493 Mon Sep 17 00:00:00 2001 From: Aleksa Vučković Date: Mon, 30 May 2022 00:10:05 +0200 Subject: \small u \smallsize --- include/08.heap/heap24.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'include/08.heap/heap24.c') diff --git a/include/08.heap/heap24.c b/include/08.heap/heap24.c index 11a4697..221bc4f 100644 --- a/include/08.heap/heap24.c +++ b/include/08.heap/heap24.c @@ -1,3 +1,10 @@ - /* this error needs to be raised or reported somehow */ - return; -} + /* clear allocation */ + id = bm[bi]; + /* oddly.. GCC did not optimize this */ + max = b->size / b->bsize; + for (x = bi; bm[x] == id && x < max; ++x) bm[x] = 0; + /* update free block count */ + b->used -= x - bi; + return; + } + } -- cgit v1.2.3