diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | gc.c | 8 |
2 files changed, 6 insertions, 6 deletions
@@ -1,3 +1,7 @@ +Tue Nov 19 18:52:10 2013 Koichi Sasada <ko1@atdot.net> + + * gc.c (heap_is_swept_object): use heap_page::before_sweep flag. + Tue Nov 19 18:49:32 2013 Koichi Sasada <ko1@atdot.net> * gc.c (rb_objspace_reachable_objects_from_root): do major marking. @@ -2168,12 +2168,8 @@ is_id_value(rb_objspace_t *objspace, VALUE ptr) static inline int heap_is_swept_object(rb_objspace_t *objspace, rb_heap_t *heap, VALUE ptr) { - struct heap_page *page = heap->sweep_pages; - while (page) { - if ((VALUE)page->start <= ptr && ptr < (VALUE)(page->start + page->limit)) return FALSE; - page = page->next; - } - return TRUE; + struct heap_page *page = GET_HEAP_PAGE(ptr); + return page->before_sweep ? FALSE : TRUE; } static inline int |