mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
3ef8be4fa4
Jemalloc 4 purges dirty pages regularly during free() when the ratio of dirty pages compared to active pages is higher than 1 << lg_dirty_mult. We set lg_dirty_mult in jemalloc_config to limit RSS usage, but it also has an impact on performance. So instead of enforcing a high ratio to force more pages being purged, we keep jemalloc's default ratio of 8, and force a regular purge of all dirty pages, after cycle collection. Keeping jemalloc's default ratio avoids cycle-collection-triggered purge to have to go through really all dirty pages when there are a lot, in which case the normal jemalloc purge during free() will already have kicked in. It also takes care of everything that doesn't run the cycle collector still having a level of purge, like plugins in the plugin-container. At the same time, since jemalloc_purge_freed_pages does nothing with jemalloc 4, repurpose the MEMORY_FREE_PURGED_PAGES_MS telemetry probe to track the time spent in this cycle-collector-triggered purge. |
||
---|---|---|
.. | ||
build | ||
fallible | ||
jemalloc | ||
mozalloc | ||
mozjemalloc | ||
replace | ||
volatile | ||
moz.build |