When is memory released to system?
- Dominant language
- C++
- Stars
- 5.3k
- Forks
- 570
- Avg merge
- 23h 43m
- Merged PRs (30d)
- 172
Description
In gperftools/tcmalloc, if you allocated and freed a bunch of memory, it wouldn't be released to the system until a call to `MallocExtension::instance()->ReleaseToSystem(bytes)`. I noticed that this isn't the case in google/tcmalloc (the memory appears to be released to the system after it is freed).
Is there a check in the release path for whether to release memory to the system? I'm wondering if releasing memory to the system might result in unnecessary churn if an application is going to repeatedly allocate and free the same amount of memory. Is this based on a configurable value?
Also, is this the correct forum to ask questions like this that aren't product issues, or is there something like a google group / mailing list that would be more appropriate?
Contributor guide
Assessment
This issue has not been assessed yet.