ruby-changes:31355
From: ktsj <ko1@a...>
Date: Sat, 26 Oct 2013 19:42:14 +0900 (JST)
Subject: [ruby-changes:31355] ktsj:r43434 (trunk): * gc.c: catch up recent changes to compile on GC_DEBUG,
ktsj 2013-10-26 19:42:07 +0900 (Sat, 26 Oct 2013) New Revision: 43434 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43434 Log: * gc.c: catch up recent changes to compile on GC_DEBUG, RGENGC_CHECK_MODE. Modified files: trunk/ChangeLog trunk/gc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 43433) +++ ChangeLog (revision 43434) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Oct 26 19:31:28 2013 Kazuki Tsujimoto <kazuki@c...> + + * gc.c: catch up recent changes to compile on GC_DEBUG, + RGENGC_CHECK_MODE. + Sat Oct 26 19:08:00 2013 Nobuyoshi Nakada <nobu@r...> * range.c (range_initialize_copy): disallow to modify after Index: gc.c =================================================================== --- gc.c (revision 43433) +++ gc.c (revision 43434) @@ -3786,12 +3786,12 @@ gc_oldgen_bitmap2flag(struct heap_page * https://github.com/ruby/ruby/blob/trunk/gc.c#L3786 static bits_t * gc_export_bitmaps(rb_objspace_t *objspace) { - bits_t *exported_bitmaps = (bits_t *)malloc(HEAP_BITMAP_SIZE * heap_used * 3); + bits_t *exported_bitmaps = (bits_t *)malloc(HEAP_BITMAP_SIZE * heap_pages_used * 3); size_t i; if (exported_bitmaps == 0) rb_bug("gc_store_bitmaps: not enough memory to test.\n"); - for (i=0; i<heap_used; i++) { + for (i=0; i<heap_pages_used; i++) { struct heap_page *page = heap_pages_sorted[i]; memcpy(&exported_bitmaps[(3*i+0)*HEAP_BITMAP_LIMIT], &page->mark_bits[0], HEAP_BITMAP_SIZE); @@ -3807,7 +3807,7 @@ gc_restore_exported_bitmaps(rb_objspace_ https://github.com/ruby/ruby/blob/trunk/gc.c#L3807 { size_t i; - for (i=0; i<heap_used; i++) { + for (i=0; i<heap_pages_used; i++) { struct heap_page *page = heap_pages_sorted[i]; /* restore bitmaps */ @@ -3831,7 +3831,7 @@ gc_save_bitmaps(rb_objspace_t *objspace) https://github.com/ruby/ruby/blob/trunk/gc.c#L3831 { size_t i; - for (i=0; i<heap_used; i++) { + for (i=0; i<heap_pages_used; i++) { struct heap_page *page = heap_pages_sorted[i]; /* save bitmaps */ @@ -3848,7 +3848,7 @@ gc_load_bitmaps(rb_objspace_t *objspace) https://github.com/ruby/ruby/blob/trunk/gc.c#L3848 { size_t i; - for (i=0; i<heap_used; i++) { + for (i=0; i<heap_pages_used; i++) { struct heap_page *page = heap_pages_sorted[i]; /* load bitmaps */ @@ -3898,7 +3898,7 @@ gc_marks_test(rb_objspace_t *objspace) https://github.com/ruby/ruby/blob/trunk/gc.c#L3898 objspace->rgengc.remembered_shady_object_count = stored_shady; /* check */ - for (i=0; i<heap_used; i++) { + for (i=0; i<heap_pages_used; i++) { bits_t *minor_mark_bits = &exported_bitmaps[(3*i+0)*HEAP_BITMAP_LIMIT]; bits_t *major_mark_bits = heap_pages_sorted[i]->mark_bits; RVALUE *p = heap_pages_sorted[i]->start; @@ -6271,7 +6271,7 @@ rb_gcdebug_print_obj_condition(VALUE obj https://github.com/ruby/ruby/blob/trunk/gc.c#L6271 fprintf(stderr, "remembered?: %s\n", MARKED_IN_BITMAP(GET_HEAP_REMEMBERSET_BITS(obj), obj) ? "true" : "false"); #endif - if (is_lazy_sweeping(objspace)) { + if (is_lazy_sweeping(heap_eden)) { fprintf(stderr, "lazy sweeping?: true\n"); fprintf(stderr, "swept?: %s\n", is_swept_object(objspace, obj) ? "done" : "not yet"); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/