summaryrefslogtreecommitdiffstats
path: root/heap.c
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2021-12-11 18:06:41 -0500
committerJon Santmyer <jon@jonsantmyer.com>2021-12-11 18:06:41 -0500
commit1b5cc0d201dc317935fb7585aa54e1489bee1caf (patch)
tree05901421c4a0c675bf89cc84ef027becb55c3078 /heap.c
parent0170e838d18369c10439c25720e11a79d65c4bff (diff)
downloaddiheap-1b5cc0d201dc317935fb7585aa54e1489bee1caf.tar.gz
diheap-1b5cc0d201dc317935fb7585aa54e1489bee1caf.tar.bz2
diheap-1b5cc0d201dc317935fb7585aa54e1489bee1caf.zip
add function to resize heap
Diffstat (limited to 'heap.c')
-rw-r--r--heap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/heap.c b/heap.c
index dc739fd..a57a45d 100644
--- a/heap.c
+++ b/heap.c
@@ -70,6 +70,12 @@ heap_create(struct heap *heap, uintptr_t at, size_t len)
return 0;
}
+void
+heap_resize(struct heap *heap, size_t newsize)
+{
+ heap->size = newsize;
+}
+
struct bucket*
__heap_bucket_findbest(struct heap *heap, size_t size)
{