Skip to content

add process.memory.malloc-heap metric - #5491

Merged
graydon merged 1 commit into
stellar:masterfrom
graydon:malloc-heap-metric
Nov 3, 2026
Merged

graydon merged 1 commit into
stellar:masterfrom
graydon:malloc-heap-metric

Conversation

@graydon

@graydon graydon commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Just adds a metric that monitors the size of the tcmalloc heap

@graydon
graydon marked this pull request as ready for review November 2, 2026 22:40
Copilot AI balanced review requested due to automatic review settings November 2, 2026 22:40
dmkozh
dmkozh previously approved these changes Nov 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The malloc-bytes metric remains unchanged after its first registration because subsequent requests do not update the counter, so it fails to track allocations and frees.

2 open issues
What changed in this PR

Adds process.memory.malloc-heap to Stellar Core’s process metrics to expose allocator memory usage.

Changes:

  • Samples allocator memory usage during process metric synchronization.
  • Documents the new counter in the metrics reference.
File Description
src/​main/​ApplicationImpl.cpp Adds the allocator helper include and heap-memory counter.
docs/​metrics.md Documents the new metric and its byte units.

Review effort: Balanced

Comment thread src/main/ApplicationImpl.cpp Resolved
Comment thread docs/metrics.md Resolved
@graydon
graydon added this pull request to the merge queue Nov 3, 2026
Merged via the queue into stellar:master with commit a1f4383 Nov 3, 2026
65 of 68 checks passed
@graydon
graydon deleted the malloc-heap-metric branch November 3, 2026 08:04
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.

3 participants