Closed Bug 1107677 Opened 10 years ago Closed 7 years ago

Investigate whether we want to enable chunk recycling for jemalloc4

Categories

(Core :: Memory Allocator, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: ggp, Unassigned)

References

Details

If we do want it, we probably want to limit the amount of recycled memory (there's a patch in bug 1073662 for that)
Depends on: 1134123
FWIW, I realized there's something missing from the chunk recycling code in bug 1073662: an eviction mechanism.

(*) On Windows, where VirtualAlloc/VirtualFree must be paired, we only cache chunksized regions. This could be a detriment if we're nearly out of memory and can no longer find |chunksize + alignment - pagesize| regions to allocate into, even though the cache may contain a contiguous region large enough. Windows should consult the cache in this case, although we'll have to VirtualFree the region and VirtualAlloc it again first (which could fail in the presence of other threads).

(*) On all platforms, the chunk cache may hold onto a region that isn't large enough for the allocation, but is inside a region that *would* be large enough. We should evict either the entire cache on OOM, or do something more clever to figure out what to evict to get the memory we need (assuming we can).

I'm not sure whether to work on this in mozjemalloc or to wait for jemalloc3 though.
Summary: Investigate whether we want to enable chunk recycling for jemalloc3 → Investigate whether we want to enable chunk recycling for jemalloc4
Per bug 1363992, jemalloc 4 related bugs are now irrelevant.
Assignee: mh+mozilla → nobody
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.