Skip to content

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

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

Closed
wants to merge 10 commits into from

Conversation

valgur
Copy link

@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.

@valgur valgur force-pushed the update/gperftools branch from b51d735 to 8a4acc4 Compare March 24, 2024 16:45
@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)

@conan-center-bot conan-center-bot requested a review from danimtb May 6, 2024 11:45
@jcar87 jcar87 self-assigned this Jun 12, 2024
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Martin Valgur seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@conan-center-build-service conan-center-build-service bot locked as off-topic and limited conversation to collaborators Mar 17, 2025
@valgur valgur deleted the update/gperftools branch April 11, 2025 15:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants