[svn:parrot] r49215 - branches/gc_massacre/src/gc
bacek at svn.parrot.org
bacek at svn.parrot.org
Tue Sep 21 23:07:16 UTC 2010
Author: bacek
Date: Tue Sep 21 23:07:16 2010
New Revision: 49215
URL: https://trac.parrot.org/parrot/changeset/49215
Log:
Use self->gc_threshold for triggering m&s.
Modified:
branches/gc_massacre/src/gc/gc_ms2.c
Modified: branches/gc_massacre/src/gc/gc_ms2.c
==============================================================================
--- branches/gc_massacre/src/gc/gc_ms2.c Tue Sep 21 23:06:37 2010 (r49214)
+++ branches/gc_massacre/src/gc/gc_ms2.c Tue Sep 21 23:07:16 2010 (r49215)
@@ -632,9 +632,9 @@
self->fixed_size_allocator = Parrot_gc_fixed_allocator_new(interp);
- /* Arbitary number */
- self->gc_threshold = 1024 * 1024;
- self->gc_threshold = 100 * 1024;
+ /* Collect every 256M allocated. */
+ /* Hardcode for now. Will be configured via CLI */
+ self->gc_threshold = 256 * 1024 * 1024;
}
interp->gc_sys->gc_private = self;
@@ -1304,7 +1304,7 @@
MarkSweep_GC *self = (MarkSweep_GC *)interp->gc_sys->gc_private;
/* Collect every 256M. Hardcode for now. Will be configured via CLI */
- if (interp->gc_sys->stats.mem_used_last_collect > 256 * 1024 * 1024) {
+ if (interp->gc_sys->stats.mem_used_last_collect > self->gc_threshold) {
gc_ms2_mark_and_sweep(interp, 0);
}
}
More information about the parrot-commits
mailing list