Counters::objs_since_last_young.Set(0);
- PostGarbageCollectionProcessing();
+ if (collector == MARK_COMPACTOR) {
+ DisableAssertNoAllocation allow_allocation;
+ GlobalHandles::PostGarbageCollectionProcessing();
+ }
+
+ // Update relocatables.
+ Relocatable::PostGarbageCollectionProcessing();
if (collector == MARK_COMPACTOR) {
// Register the amount of external allocated memory.
}
-void Heap::PostGarbageCollectionProcessing() {
- // Process weak handles post gc.
- {
- DisableAssertNoAllocation allow_allocation;
- GlobalHandles::PostGarbageCollectionProcessing();
- }
- // Update relocatables.
- Relocatable::PostGarbageCollectionProcessing();
-}
-
-
void Heap::MarkCompact(GCTracer* tracer) {
gc_state_ = MARK_COMPACT;
mc_count_++;
static void GarbageCollectionPrologue();
static void GarbageCollectionEpilogue();
- // Code that should be executed after the garbage collection proper.
- static void PostGarbageCollectionProcessing();
-
// Performs garbage collection operation.
// Returns whether required_space bytes are available after the collection.
static bool CollectGarbage(int required_space, AllocationSpace space);