From 368191918b326b322eb89484e84a3e678bc2b33b Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Sun, 29 Sep 2013 13:14:34 +0900 Subject: [PATCH] Patch from Peter Michaux to allow reordering the heap struct so the data pointer is not the last element. --- gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gc.c b/gc.c index eb68c300..cf915870 100644 --- a/gc.c +++ b/gc.c @@ -465,7 +465,7 @@ sexp_heap sexp_make_heap (size_t size, size_t max_size) { if (! h) return NULL; h->size = size; h->max_size = max_size; - h->data = (char*) sexp_heap_align(sizeof(h->data)+(sexp_uint_t)&(h->data)); + h->data = (char*) sexp_heap_align(sizeof(h) + (sexp_uint_t)&(h)); free = h->free_list = (sexp_free_list) h->data; h->next = NULL; next = (sexp_free_list) (((char*)free)+sexp_heap_align(sexp_free_chunk_size));