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

gperftools: add a test for plain malloc() support #22667

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

valgur
Copy link
Contributor

@valgur valgur commented Feb 5, 2024

Adds MALLOCSTATS=1 env var, which enable malloc statistics on program termination:

gperftools/2.15 (test package): RUN: ./test_package_indirect
------------------------------------------------
MALLOC:          90112 (    0.1 MiB) Bytes in use by application
MALLOC: +       942080 (    0.9 MiB) Bytes in page heap freelist
MALLOC: +        16264 (    0.0 MiB) Bytes in central cache freelist
MALLOC: +            0 (    0.0 MiB) Bytes in transfer cache freelist
MALLOC: +          120 (    0.0 MiB) Bytes in thread cache freelists
MALLOC: +      2490368 (    2.4 MiB) Bytes in malloc metadata
MALLOC:   ------------
MALLOC: =      3538944 (    3.4 MiB) Actual memory used (physical + swap)
MALLOC: +            0 (    0.0 MiB) Bytes released to OS (aka unmapped)
MALLOC:   ------------
MALLOC: =      3538944 (    3.4 MiB) Virtual address space used
MALLOC:
MALLOC:              7              Spans in use
MALLOC:              2              Thread heaps in use
MALLOC:           8192              Tcmalloc page size
------------------------------------------------
Call ReleaseFreeMemory() to release freelist memory to the OS (via madvise()).
Bytes released to the OS take up virtual address space but no physical memory.

This allows the use of plain malloc() to be tested in a verifiable manner in addition to the existing direct tc_malloc() functions from an included header.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 3 (8a4acc46d1d2039397246bbc964e243c66a6a90b):

  • gperftools/2.14.0:
    All packages built successfully! (All logs)

  • gperftools/2.15:
    All packages built successfully! (All logs)

  • gperftools/2.13.0:
    All packages built successfully! (All logs)

  • gperftools/2.11.0:
    All packages built successfully! (All logs)

  • gperftools/2.12.0:
    All packages built successfully! (All logs)

  • gperftools/2.10.0:
    All packages built successfully! (All logs)


Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 3 (8a4acc46d1d2039397246bbc964e243c66a6a90b):

  • gperftools/2.15:
    All packages built successfully! (All logs)

  • gperftools/2.13.0:
    All packages built successfully! (All logs)

  • gperftools/2.14.0:
    All packages built successfully! (All logs)

  • gperftools/2.11.0:
    All packages built successfully! (All logs)

  • gperftools/2.12.0:
    All packages built successfully! (All logs)

  • gperftools/2.10.0:
    All packages built successfully! (All logs)

@jcar87 jcar87 self-assigned this Jun 12, 2024
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

Successfully merging this pull request may close these issues.

5 participants