Skip to content

Commit b23c23d

Browse files
committedMay 21, 2015
Check for pending GC request without STW.
1 parent 3d752ba commit b23c23d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

Diff for: ‎vm/object_memory.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,13 @@ namespace rubinius {
507507
// Don't go any further unless we're allowed to GC.
508508
if(!can_gc()) return;
509509

510+
/* A pending GC is less common than not, so don't checkpoint the entire
511+
* process to check for the condition.
512+
*
513+
* This is a race, but that is handled by the stop_the_world code below.
514+
*/
515+
if(!collect_young_now && !collect_mature_now) return;
516+
510517
while(!state->stop_the_world()) {
511518
state->checkpoint(gct, call_frame);
512519

0 commit comments

Comments
 (0)
Please sign in to comment.