try rewinding the other 3m GC change, instead

svn: r3916
This commit is contained in:
Matthew Flatt 2006-08-01 12:48:48 +00:00
parent e7c4118b7e
commit be23f457c0
3 changed files with 7 additions and 8 deletions

View File

@ -493,8 +493,6 @@ void *GC_malloc_one_small_tagged(size_t sizeb)
{ {
unsigned long newsize; unsigned long newsize;
return GC_malloc_one_tagged(sizeb);
sizeb += WORD_SIZE; sizeb += WORD_SIZE;
sizeb = ALIGN_BYTES_SIZE(sizeb); sizeb = ALIGN_BYTES_SIZE(sizeb);
newsize = gen0_alloc_page->size + sizeb; newsize = gen0_alloc_page->size + sizeb;
@ -566,10 +564,10 @@ inline static void resize_gen0(unsigned long new_size)
struct mpage *work = gen0_pages, *prev = NULL; struct mpage *work = gen0_pages, *prev = NULL;
unsigned long alloced_size = 0; unsigned long alloced_size = 0;
/* fist make sure the big pages pointer is clean */ /* first, make sure the big pages pointer is clean */
gen0_big_pages = NULL; gen0_big_pages = NULL;
/* then, clear out any parts of gen0 we're keeping, and deallocated any /* then, reset any parts of gen0 we're keeping, and deallocate any
parts we're throwing out */ parts we're throwing out */
while(work) { while(work) {
if(alloced_size > new_size) { if(alloced_size > new_size) {
@ -591,10 +589,11 @@ inline static void resize_gen0(unsigned long new_size)
break; break;
} else { } else {
/* We used to zero out the memory here, but its /* We used to zero out the memory here, but it's
better to zero out on allocation, instead: better to zero out on allocation, instead:
better locality, and we don't have to zero better locality, and we don't have to zero
for atomic allocations. */ for atomic allocations. */
bzero(PPTR(work) + HEADER_SIZEW, work->size - gcWORDS_TO_BYTES(HEADER_SIZEW)); /* REMOVEME */
alloced_size += GEN0_PAGE_SIZE; alloced_size += GEN0_PAGE_SIZE;
work->size = HEADER_SIZEB; work->size = HEADER_SIZEB;
prev = work; prev = work;

View File

@ -2900,7 +2900,7 @@ static int generate_inlined_binary(mz_jit_state *jitter, Scheme_App3_Rec *app, i
mz_prepare(2); mz_prepare(2);
jit_pusharg_p(JIT_R1); jit_pusharg_p(JIT_R1);
jit_pusharg_p(JIT_R0); jit_pusharg_p(JIT_R0);
#ifdef __MZ_PRECISE_GC #ifdef MZ_PRECISE_GC
(void)mz_finish(GC_malloc_pair); (void)mz_finish(GC_malloc_pair);
#else #else
(void)mz_finish(scheme_make_pair); (void)mz_finish(scheme_make_pair);

View File

@ -528,7 +528,7 @@ scheme_init_list (Scheme_Env *env)
Scheme_Object *scheme_make_pair(Scheme_Object *car, Scheme_Object *cdr) Scheme_Object *scheme_make_pair(Scheme_Object *car, Scheme_Object *cdr)
{ {
#ifndef __MZ_PRECISE_GC #ifndef MZ_PRECISE_GC
Scheme_Object *cons; Scheme_Object *cons;
#endif #endif
@ -541,7 +541,7 @@ Scheme_Object *scheme_make_pair(Scheme_Object *car, Scheme_Object *cdr)
*(long *)0x0 = 1; *(long *)0x0 = 1;
#endif #endif
#ifdef __MZ_PRECISE_GC #ifdef MZ_PRECISE_GC
return GC_malloc_pair(car, cdr); return GC_malloc_pair(car, cdr);
#else #else
cons = scheme_alloc_object(); cons = scheme_alloc_object();