1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include "alloc.h" #include "macros.h" void arena_zero(arena *a) { ASSUME(a != nullptr); struct _region *cur = a->_head; while (cur != nullptr) { cur->len = 0; cur->last = cur->data; cur = cur->next; } }