Skip to content

How to estimate the number of bytes that have been released back to OS? #2832

Open

Description

@nezdolik

Hi, how could one estimate the number of bytes that have been released back to OS in jemalloc? Looks like one part of it would be estimating the amount of muzzy bytes (the pages that have been marked with MADVISE_FREE) across all arenas and all extents. But that will not take into account the pages marked via MADVISE_DONTNEED. Is there is a better stat to estimate this number? (e.g number of bytes purged?)

Activity

  1. LongWei-27 commented on Oct 11, 2026

    @LongWei-27

    I think a better approach would be to use strace to count the munmap and madvise system calls of the corresponding process.

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