From 137305bbc9e264fd0075ec25d7374aecab7ed1f6 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Tue, 20 Oct 2015 02:13:31 -0400 Subject: [PATCH] Bug fixes --- runtime.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime.c b/runtime.c index a60e70a8..58a2054c 100644 --- a/runtime.c +++ b/runtime.c @@ -2382,7 +2382,7 @@ char *gc_move(char *obj, gc_thread_data *thd, int *alloci, int *heap_grown) { switch(type_of(obj)){ case cons_tag: { - list hobj = gc_alloc(Cyc_heap, sizeof(cons_type), heap_grown); + list hobj = gc_alloc(Cyc_heap, sizeof(cons_type), heap_grown); // hobj ==> new heap object hobj->hdr.mark = 0; type_of(hobj) = cons_tag; car(hobj) = car(obj); @@ -2473,7 +2473,7 @@ char *gc_move(char *obj, gc_thread_data *thd, int *alloci, int *heap_grown) { case closureN_tag: { int i; closureN_type *hobj = gc_alloc(Cyc_heap, - sizeof(closureN_type) + sizeof(object) * hobj->num_elt, + sizeof(closureN_type) + sizeof(object) * (((closureN) obj)->num_elt), heap_grown); mark(hobj) = 0; type_of(hobj) = closureN_tag; @@ -2491,7 +2491,7 @@ char *gc_move(char *obj, gc_thread_data *thd, int *alloci, int *heap_grown) { case vector_tag: { int i; vector_type *hobj = gc_alloc(Cyc_heap, - sizeof(vector_type) + sizeof(object) * hobj->num_elt, + sizeof(vector_type) + sizeof(object) * (((vector) obj)->num_elt), heap_grown); mark(hobj) = 0; type_of(hobj) = vector_tag;