예제 #1
0
파일: alloc.c 프로젝트: 01BTC10/pbc
void 
_pbcH_delete(struct heap *h) {
	struct heap_page * p = h->current;
	struct heap_page * next = p->next;
	for(;;) {
		_pbcM_free(p);
		if (next == NULL)
			break;
		p = next;
		next = p->next;
	}
	_pbcM_free(h);
}
예제 #2
0
void 
_pbcA_close(pbc_array _array) {
	struct array * a = (struct array *)_array;
	if (a->heap == NULL && a->a != NULL && (union _pbc_var *)(a+1) != a->a) {
		_pbcM_free(a->a);
		a->a = NULL;
	}
}