Skip to content

Add theap stats retrieval - #1366

Merged
Daan (daanx) merged 1 commit into
microsoft:dev3from
res2k:theap-stats
Aug 15, 2026
Merged

Add theap stats retrieval#1366
Daan (daanx) merged 1 commit into
microsoft:dev3from
res2k:theap-stats

Conversation

@res2k

Copy link
Copy Markdown
Contributor

theaps already track stats internally - expose them for those who'd like to make use of them (for example, to track the current thread's allocations).

@daanx

Copy link
Copy Markdown
Collaborator

Nice. My only worry is that it is unsafe to get the stats from a theap that is not the current thread's theap. But perhaps best to still expose it for systems that pause the threads anyway to gather precise stats?

@res2k

Copy link
Copy Markdown
Contributor Author

Given the whole theap idea is "thread-local heaps", I think this "unsafe" stats retrieval fits into that idea - you may be able to retrieve stats from some other thread, but you're not really supposed to.

@daanx
Daan (daanx) merged commit 1035bbe into microsoft:dev3 Aug 15, 2026
1 check passed
@daanx

Copy link
Copy Markdown
Collaborator

Agreed :-) Thanks Frank.

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.

2 participants