Author: Whiteknight
Date: Wed Aug 13 16:23:09 2008
New Revision: 30213
Modified:
branches/gsoc_pdd09/src/gc/gc_it.c
branches/gsoc_pdd09/src/gc/smallobject.c
Log:
[gsoc_pdd09] remove an unnecessary debug statement, and fix a bounds condition
that was causing an assertion failure (and other segfault nonsense)
Modified: branches/gsoc_pdd09/src/gc/gc_it.c
==============================================================================
--- branches/gsoc_pdd09/src/gc/gc_it.c (original)
+++ branches/gsoc_pdd09/src/gc/gc_it.c Wed Aug 13 16:23:09 2008
@@ -579,7 +579,7 @@
Gc_it_hdr *hdr = (Gc_it_hdr *)arena->start_objects;
UINTVAL mark;
- while (i >= 0) {
+ while (i > 0) {
/* this is a heavily stripped-down version of what it should be.
Eventually, this is all going to get more efficient:
1) going to re-unroll the loop like I have in the sized header
@@ -640,7 +640,7 @@
/* Partially unroll the loop with Duff's device: four items at a time.
I can make some parts of this more efficient, but for now let's
stick with the basics. */
- while (i >= 0) {
+ while (i > 0) {
mark = gc_it_get_card_mark(hdr);
if (mark == GC_IT_CARD_WHITE) {
gc_it_add_free_header(interp, pool, hdr);
Modified: branches/gsoc_pdd09/src/gc/smallobject.c
==============================================================================
--- branches/gsoc_pdd09/src/gc/smallobject.c (original)
+++ branches/gsoc_pdd09/src/gc/smallobject.c Wed Aug 13 16:23:09 2008
@@ -98,7 +98,6 @@
const ptrdiff_t ptr_diff =
(ptrdiff_t)ptr - (ptrdiff_t)arena->start_objects;
- fprintf(stderr, "ptr_diff: %d\n", ptr_diff);
if (0 <= ptr_diff
# if PARROT_GC_IT
&& ptr_diff < (ptrdiff_t)(arena->total_objects *
pool->object_size)