msgc_context_t *msgc_begin( gc_t *gc ) { caddr_t lowest, highest; int doublewords; msgc_context_t *context; context = must_malloc( sizeof( msgc_context_t ) ); context->gc = gc; gclib_memory_range( &lowest, &highest ); context->lowest_heap_address = (word*)lowest; context->highest_heap_address = (word*)highest; doublewords = roundup(highest-lowest,(2*sizeof(word)))/(2*sizeof(word)); context->words_in_bitmap = roundup(doublewords,(8*sizeof(word)))/(8*sizeof(word)); context->bitmap = gclib_alloc_rts( context->words_in_bitmap * sizeof(word), 0 ); memset( context->bitmap, 0, context->words_in_bitmap*sizeof(word) ); context->stack.seg = 0; context->stack.stkp = 0; context->stack.stkbot = 0; context->stack.stklim = 0; push_segment( &context->stack ); context->los_stack.seg = 0; context->los_stack.stkp = 0; context->los_stack.stkbot = 0; context->los_stack.stklim = 0; push_segment( &context->los_stack ); return context; }
msgc_context_t *msgc_begin( gc_t *gc ) { caddr_t lowest, highest; gclib_memory_range( &lowest, &highest ); return msgc_begin_range( gc, lowest, highest ); }