зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1052793, part 2 - Shrink GC buffers during compartmental GCs. r=terrence
With part 1, many more GCs are compartmental, so it is no longer a good indication that there is heavy activity. If we don't regularly try to shrink GC buffers, we don't decommit arenas enough, causing a large regression in memory usage.
This commit is contained in:
Родитель
8705772a81
Коммит
1575a306bd
|
@ -2288,13 +2288,10 @@ DOMGCSliceCallback(JSRuntime *aRt, JS::GCProgress aProgress, const JS::GCDescrip
|
|||
}
|
||||
} else {
|
||||
nsJSContext::KillFullGCTimer();
|
||||
}
|
||||
|
||||
// Avoid shrinking during heavy activity, which is suggested by
|
||||
// compartment GC. We don't need to shrink after a shrinking GC as this
|
||||
// happens automatically in this case.
|
||||
if (aDesc.invocationKind_ == GC_NORMAL) {
|
||||
nsJSContext::PokeShrinkGCBuffers();
|
||||
}
|
||||
if (aDesc.invocationKind_ == GC_NORMAL) {
|
||||
nsJSContext::PokeShrinkGCBuffers();
|
||||
}
|
||||
|
||||
if (ShouldTriggerCC(nsCycleCollector_suspectedCount())) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче