llvm/scudo/1e6b7275b4cd150563884a293a3bf7b7fe813bbe [scudo] Add MaxCacheResidentBytes to Secondary
Introduce DefaultMaxCacheResidentBytes in the cache configuration and
MaxCacheResidentBytes at runtime to enforce an upper bound on total
resident memory in the Secondary cache.
When storing a block causes resident bytes to exceed the threshold,
physical pages from the oldest cached entries are released to the OS via
releaseAndZeroPagesToOS() while preserving their virtual address
mappings in the cache.
Also adds Option::MaxCacheResidentBytes and M_CACHE_RESIDENT_BYTES_MAX
to allow tuning this limit dynamically via mallopt().
GitOrigin-RevId: b2c390e532f1a89c6946b65644c6cf05ca2b8b90
9 files changed