aboutsummaryrefslogtreecommitdiff
path: root/lib/alloc/arena_zero.c
blob: b0e3fbebd3344881d7b7a269085526de2b426458 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#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 = cur->next;
	}
}