git://git.cassowary.me
/
sarabande.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e7d5b70
)
whoops, forgot to initialize pointers here
author
cassowarii
<cassowary@cassowary.me>
Tue, 30 Jun 2026 22:32:41 +0000
(15:32 -0700)
committer
cassowarii
<cassowary@cassowary.me>
Tue, 30 Jun 2026 22:32:41 +0000
(15:32 -0700)
src/mem/pool.c
patch
|
blob
|
history
diff --git
a/src/mem/pool.c
b/src/mem/pool.c
index
515fc38
..
7fe1b37
100644
(file)
--- a/
src/mem/pool.c
+++ b/
src/mem/pool.c
@@
-35,6
+35,9
@@
void sbPool_initialize(hPool pl, usize elem_size, usize block_size) {
*pl = (sbPool) {0};
pl->elem_size = elem_size;
pl->block_size = block_size;
+ pl->block_ptr_capacity = 8;
+ pl->block_ptrs = calloc(pl->block_ptr_capacity, sizeof(void*));
+ pl->used_counts = calloc(pl->block_ptr_capacity, sizeof(u16));
alloc_new_block(pl);
}