/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim:set ts=2 sw=2 sts=2 et cindent: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Only enable PHC if there are at least 8GB of ram. Note that we use // 1000 bytes per kilobyte rather than 1024. Some 8GB machines will have // slightly lower actual RAM available after some hardware devices // reserve some. if (StaticPrefs::memory_phc_enabled() && mem_size >= min_mem_size) { // Set PHC probablities before enabling PHC so that the first allocation // delay gets used. if (XRE_IsContentProcess()) { // Content processes can come and go and have their own delays // configured.
SetPHCProbabilities(
StaticPrefs::memory_phc_avg_delay_content_first(),
StaticPrefs::memory_phc_avg_delay_content_normal(),
StaticPrefs::memory_phc_avg_delay_content_page_reuse());
} else { // All other process types tend to exist for the length of the // session, they're grouped here.
SetPHCProbabilities(StaticPrefs::memory_phc_avg_delay_first(),
StaticPrefs::memory_phc_avg_delay_normal(),
StaticPrefs::memory_phc_avg_delay_page_reuse());
}
glean::memory_phc::slots_allocated.AccumulateSingleSample(
stats.mSlotsAllocated);
glean::memory_phc::slots_freed.AccumulateSingleSample(stats.mSlotsFreed); // There are also slots that are unused (neither free nor allocated) they // can be calculated by knowing the total number of slots.
}
}; // namespace mozilla
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.