зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1110514 - Use arena.<i>.purge to free jemalloc3's dirty pages. r=glandium
This commit is contained in:
Родитель
3474257e0f
Коммит
1fb7597a1b
|
@ -177,5 +177,12 @@ jemalloc_purge_freed_pages_impl()
|
|||
MOZ_JEMALLOC_API void
|
||||
jemalloc_free_dirty_pages_impl()
|
||||
{
|
||||
je_(mallctl)("arenas.purge", NULL, 0, NULL, 0);
|
||||
unsigned narenas;
|
||||
size_t mib[3];
|
||||
size_t miblen = sizeof(mib) / sizeof(mib[0]);
|
||||
|
||||
CTL_GET("arenas.narenas", narenas);
|
||||
je_(mallctlnametomib)("arena.0.purge", mib, &miblen);
|
||||
mib[1] = narenas;
|
||||
je_(mallctlbymib)(mib, miblen, NULL, NULL, NULL, 0);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче