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

Total heap allocated memory #84091

Open
ipankr opened this issue Jan 16, 2025 · 1 comment · May be fixed by #84090
Open

Total heap allocated memory #84091

ipankr opened this issue Jan 16, 2025 · 1 comment · May be fixed by #84090
Assignees
Labels
area: Kernel Enhancement Changes/Updates/Additions to existing features

Comments

@ipankr
Copy link

ipankr commented Jan 16, 2025

Is your enhancement proposal related to a problem? Please describe.
To request heap statistics, a pointer to a heap structure is required. This is straightforward for a user-defined heap. However, such a pointer is not known for heaps created by other components or libraries, like libc. Therefore, it is not possible to calculate the total heap allocated memory.

Describe the solution you'd like
A possible solution is to use an array of pointers, which is filled in on every sys_heap_init() call. One can then iterate through it to sum up the total memory allocated for all heaps.

Describe alternatives you've considered
A list of pointers instead of an array could be another approach, but it requires a heap, which is not always available.

@ipankr ipankr added the Enhancement Changes/Updates/Additions to existing features label Jan 16, 2025
Copy link

Hi @ipankr! We appreciate you submitting your first issue for our open-source project. 🌟

Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Kernel Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants