task_runner_->PostDelayedTask(
Thiabaud EngelbrechtWe need to avoid double posting:
Either we cancel the previous posted task, or we avoid reposting (that seems easier if canceling is too complicated)
Done
Thiabaud EngelbrechtWe want to SampleAllocation() too here
Done
if (!started) {
Thiabaud EngelbrechtIf it does start, we want to remember that we did on NotifyMarkCompact (called when gc ends)
On a NotifyMarkCompact() event that was started by SimpleMemoryReducer, we don't want to schedule the timer.
Done
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
bool is_running_ = false;
Nit: `is_scheduled`, will help disambiguate with `triggered_mark_compact` (see my other commend)
ScheduleTimer(kDelayMs, true);
We should prevent ScheduleTimer if NotifyPossibleGarbage() was triggered by our own GC.
You will probably have to add a `bool triggered_mark_compact` that reset here, and if true you don't call ScheduleTimer.
// Leave some room for precision error in task scheduler.
const double kSlackMs = 100;
I doubt that's necessary and can't really figure out why that was introduced in the original MemoryReducer.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Nit: `is_scheduled`, will help disambiguate with `triggered_mark_compact` (see my other commend)
Done
We should prevent ScheduleTimer if NotifyPossibleGarbage() was triggered by our own GC.
You will probably have to add a `bool triggered_mark_compact` that reset here, and if true you don't call ScheduleTimer.
Done
// Leave some room for precision error in task scheduler.
const double kSlackMs = 100;
I doubt that's necessary and can't really figure out why that was introduced in the original MemoryReducer.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
auto memory_reducer =
reinterpret_cast<SimpleMemoryReducer*>(heap->memory_reducer());
Is this created after memory_reducer_simple = true now?
How do we know this is indeed a SimpleMemoryReducer?
memory_reducer->AllowRunning();
Why is this needs - Do you know what triggers the memory reducer otherwise?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |