develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34313 - in branches/pdd09gc_part1/src: . gc

From:
Whiteknight
Date:
December 23, 2008 18:58
Subject:
[svn:parrot] r34313 - in branches/pdd09gc_part1/src: . gc
Message ID:
20081224025804.1A4DCCBA12@x12.develooper.com
Author: Whiteknight
Date: Tue Dec 23 18:58:02 2008
New Revision: 34313

Modified:
   branches/pdd09gc_part1/src/gc/incremental_ms.c
   branches/pdd09gc_part1/src/gc/smallobject.c
   branches/pdd09gc_part1/src/headers.c

Log:
[pdd09gc_part1] fix a failed assertion, fix a segfault, and keep pmc_ext managed by the old ms collector. This solves A LOT of problems

Modified: branches/pdd09gc_part1/src/gc/incremental_ms.c
==============================================================================
--- branches/pdd09gc_part1/src/gc/incremental_ms.c	(original)
+++ branches/pdd09gc_part1/src/gc/incremental_ms.c	Tue Dec 23 18:58:02 2008
@@ -830,7 +830,7 @@
     PObj * p = (PObj*)to_add;
     Gc_it_hdr * const hdr = PObj_to_IT_HDR(p);
     PARROT_ASSERT(IT_HDR_to_PObj(hdr) == p);
-    PARROT_ASSERT(contained_in_pool(pool, p));
+    //PARROT_ASSERT(contained_in_pool(pool, p));
     gc_it_add_free_header(interp, pool, hdr);
 }
 

Modified: branches/pdd09gc_part1/src/gc/smallobject.c
==============================================================================
--- branches/pdd09gc_part1/src/gc/smallobject.c	(original)
+++ branches/pdd09gc_part1/src/gc/smallobject.c	Tue Dec 23 18:58:02 2008
@@ -54,7 +54,11 @@
             (ptrdiff_t)ptr - (ptrdiff_t)arena->start_objects;
 
         if (0 <= ptr_diff
+#if PARROT_GC_IT
+                && ptr_diff < (ptrdiff_t)(arena->total_objects * pool->object_size)
+#else
                 && ptr_diff < (ptrdiff_t)(arena->used * pool->object_size)
+#endif
                 && ptr_diff % pool->object_size == 0)
             return 1;
     }

Modified: branches/pdd09gc_part1/src/headers.c
==============================================================================
--- branches/pdd09gc_part1/src/headers.c	(original)
+++ branches/pdd09gc_part1/src/headers.c	Tue Dec 23 18:58:02 2008
@@ -706,6 +706,8 @@
      * Use GS MS pool functions
      */
     gc_pmc_ext_pool_init(arena_base->pmc_ext_pool);
+#elif PARROT_GC_IT
+    gc_pmc_ext_pool_init(arena_base->pmc_ext_pool);
 #else
     /* rational, consistant behavior (as yet unwritten) */
 #endif



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About