1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* gc.c: catch up recent changes to compile on GC_DEBUG,

RGENGC_CHECK_MODE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ktsj 2013-10-26 10:42:07 +00:00
parent 64f2b9f990
commit ad367a256e
2 changed files with 12 additions and 7 deletions

View file

@ -1,3 +1,8 @@
Sat Oct 26 19:31:28 2013 Kazuki Tsujimoto <kazuki@callcc.net>
* gc.c: catch up recent changes to compile on GC_DEBUG,
RGENGC_CHECK_MODE.
Sat Oct 26 19:08:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* range.c (range_initialize_copy): disallow to modify after

14
gc.c
View file

@ -3786,12 +3786,12 @@ gc_oldgen_bitmap2flag(struct heap_page *page)
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_t *objspace, bits_t *exported_bitmaps)
{
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)
{
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)
{
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)
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)
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");
}