diff options
Diffstat (limited to 'lib/alloc/arena_alloc.c')
-rw-r--r-- | lib/alloc/arena_alloc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/alloc/arena_alloc.c b/lib/alloc/arena_alloc.c index 814b0bb..65123d4 100644 --- a/lib/alloc/arena_alloc.c +++ b/lib/alloc/arena_alloc.c @@ -36,6 +36,7 @@ mkregion(size_t cap) errno = save; return nullptr; } + r->last = r->data; return r; } @@ -63,6 +64,7 @@ arena_alloc(arena *a, size_t sz, size_t n, size_t align) if (nlen <= r->cap) { void *ret = (char *)r->data + off; r->len = nlen; + r->last = ret; return ret; } } |