Skip to content

Commit

Permalink
[GC] Added a PMC/STRING flag check to mem tracer.
Browse files Browse the repository at this point in the history
This should be safe (though feel free to revert if it causes odd GC behavior).
In a GC-light vpm.pir benchmark, this improves performance by 0.946%. Depth of
C stack as well as memory layout will vary these results.
  • Loading branch information
chromatic committed Jul 4, 2011
1 parent 41d54b9 commit 318f52c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gc/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,10 +502,12 @@ trace_mem_block(PARROT_INTERP,
* free headers... */
if ((pmc_min <= ptr)
&& (ptr < pmc_max)
&& (PObj_is_PMC_TEST((PObj *)ptr))
&& interp->gc_sys->is_pmc_ptr(interp, (void *)ptr)) {
Parrot_gc_mark_PMC_alive(interp, (PMC *)ptr);
}
else if ((buffer_min <= ptr) && (ptr < buffer_max)
&& (PObj_is_string_TEST((PObj *)ptr))
&& interp->gc_sys->is_string_ptr(interp, (void *)ptr)) {
if (PObj_is_string_TEST((PObj *)ptr))
Parrot_gc_mark_STRING_alive(interp, (STRING *)ptr);
Expand Down

0 comments on commit 318f52c

Please sign in to comment.