aboutsummaryrefslogtreecommitdiff
path: root/src/std
diff options
context:
space:
mode:
Diffstat (limited to 'src/std')
-rw-r--r--src/std/scoped_allocator.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/std/scoped_allocator.c b/src/std/scoped_allocator.c
index d53edad..deb9e1e 100644
--- a/src/std/scoped_allocator.c
+++ b/src/std/scoped_allocator.c
@@ -90,10 +90,11 @@ int scoped_allocator_alloc(ScopedAllocator *self, usize size, void **mem) {
/* Reallocated (new node created) */
if(self->current != current) {
*mem = self->current->data;
+ self->current->size += size;
} else {
*mem = align_ptr_ceil(self->current->data + self->current->size, 16);
+ self->current->size += alloc_size;
}
- self->current->size = size;
return 0;
}