aboutsummaryrefslogtreecommitdiff
path: root/lib/alloc/arena_zero.c
blob: 296007e78dfdcce65fadd3b7f1e726408b563757 (plain) (blame)
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;
	}
}