Reverting patch from Peter Michaux.

This commit is contained in:
Alex Shinn 2013-09-29 13:26:59 +09:00
parent 67e50cefaa
commit ae1f0fd76d

2
gc.c
View file

@ -465,7 +465,7 @@ sexp_heap sexp_make_heap (size_t size, size_t max_size) {
if (! h) return NULL; if (! h) return NULL;
h->size = size; h->size = size;
h->max_size = max_size; h->max_size = max_size;
h->data = (char*) sexp_heap_align(sizeof(h) + (sexp_uint_t)&(h)); h->data = (char*) sexp_heap_align(sizeof(h->data)+(sexp_uint_t)&(h->data));
free = h->free_list = (sexp_free_list) h->data; free = h->free_list = (sexp_free_list) h->data;
h->next = NULL; h->next = NULL;
next = (sexp_free_list) (((char*)free)+sexp_heap_align(sexp_free_chunk_size)); next = (sexp_free_list) (((char*)free)+sexp_heap_align(sexp_free_chunk_size));