Skip to content

When is memory released to system? #176

Open

Description

@SrivastavaAnubhav

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions