<!-- llms-explorer concept facts · https://llms-explorer.com/tree/tcmalloc-zero-rate-background-release-versus-allocator-generation-units/ · pack 2026-11-02 · ~782 tokens -->

# TCMalloc zero-rate background release versus allocator-generation units

> Source-anchored research for TCMalloc zero-rate background release versus allocator-generation units. Run status: COMPLETED.

Parent: [WiredTiger cache eviction and dirty ratio](https://llms-explorer.com/tree/wiredtiger-cache-eviction-and-dirty-ratio/) · 3 facets · 3 facts · page: https://llms-explorer.com/tree/tcmalloc-zero-rate-background-release-versus-allocator-generation-units/

## How it works

- The pinned upstream interface scopes its zero-inhibits-release wording to the background page-heap release path. ProcessBackgroundActions() also performs housekeeping that releases memory from inaccessible CPUs. Thus a zero configured page-heap rate must not be read as disabling every background action; The cited MongoDB release still starts this loop when its background-thread flag and NeedsProcessBackgroundActions() permit it. This is an interface-level explanation, not a measured MongoDB zero-rate release amount. (high confidence) — [source](https://github.com/google/tcmalloc/blob/3f041ff383769ae362a3f60dbc3b6a4226abdf8d/tcmalloc/malloc_extension.h) · [also](https://github.com/mongodb/mongo/blob/r8.0.0/src/mongo/util/allocator_tcmalloc_thread.cpp)

## Measurements and reference values

- The zero-rate background-thread interpretation must be bounded by allocator generation: the MongoDB 8.0 reference says tcmalloc-gperf platforms, including Windows, PPC and s390x, retain earlier tcmallocReleaseRate behavior. In the cited MongoDB release, startAllocatorThread() implements the background loop only under MONGO_CONFIG_TCMALLOC_GOOGLE; the other compile-time branch does nothing. Enabling the parameter therefore does not establish that this Google allocator background loop exists on a gperf build. (high confidence) — [source](https://www.mongodb.com/docs/v8.0/reference/parameters/) · [also](https://github.com/mongodb/mongo/blob/r8.0.0/src/mongo/util/allocator_tcmalloc_thread.cpp)

## Problems, failure modes and limitations

- Attributed positions in the cited documentation: the manual Markdown’s general tcmallocReleaseRate=0 sentence says MongoDB does not return memory; its tcmallocEnableBackgroundThread=true and tcmallocReleaseRate=0 note says that MongoDB still releases memory. The MongoDB 8.0 parameter reference explicitly states this conditional background-thread exception for the Google-TCMalloc path and describes possible release near the heap limit and from intermediate caches. In the cited MongoDB release, the Google-allocator thread-start code checks the background-thread flag and NeedsProcessBackgroundActions(), but does not test tcmallocReleaseRate before invoking ProcessBackgroundActions(). These are attributed documentation positions and a scoped code path, not two unconditional runtime conclusions or a promise of a measured release amount. (high confidence) — [source](https://github.com/mongodb/mongo/blob/r8.0.0/src/mongo/util/allocator_tcmalloc_thread.cpp) · [also](https://www.mongodb.com/docs/manual/reference/parameters.md) · [also](https://www.mongodb.com/docs/v8.0/reference/parameters/)
