Skip to content

Commit

Permalink
Check for pending GC request without STW.
Browse files Browse the repository at this point in the history
  • Loading branch information
brixen committed May 21, 2015
1 parent 3d752ba commit b23c23d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions vm/object_memory.cpp
Expand Up @@ -507,6 +507,13 @@ namespace rubinius {
// Don't go any further unless we're allowed to GC.
if(!can_gc()) return;

/* A pending GC is less common than not, so don't checkpoint the entire
* process to check for the condition.
*
* This is a race, but that is handled by the stop_the_world code below.
*/
if(!collect_young_now && !collect_mature_now) return;

while(!state->stop_the_world()) {
state->checkpoint(gct, call_frame);

Expand Down

0 comments on commit b23c23d

Please sign in to comment.