Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When is memory released to system? #176

Open
SrivastavaAnubhav opened this issue Mar 27, 2023 · 0 comments
Open

When is memory released to system? #176

SrivastavaAnubhav opened this issue Mar 27, 2023 · 0 comments

Comments

@SrivastavaAnubhav
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant