feat(mem): add KernelStack field for ExVirtualMemory on linux#1986
Merged
feat(mem): add KernelStack field for ExVirtualMemory on linux#1986
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds the KernelStack field to both the VirtualMemoryStat struct and the Linux-specific ExVirtualMemory struct. This field was previously missing but is available in Linux's /proc/meminfo. The change ensures that kernel stack memory usage is captured and exposed through both the general and extended memory statistics APIs on Linux.
Key Changes:
- Added
KernelStackfield toVirtualMemoryStatstruct with camelCase JSON tag - Added
KernelStackfield to Linux-specificExVirtualMemorystruct - Updated Linux parsing logic to populate both
KernelStackfields from/proc/meminfo
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| mem/mem.go | Added KernelStack field to VirtualMemoryStat struct between Sunreclaim and PageTables |
| mem/ex_linux.go | Added KernelStack field to Linux-specific ExVirtualMemory struct |
| mem/mem_linux.go | Added parsing logic for KernelStack from /proc/meminfo, populating both main and extended memory stats |
| mem/mem_test.go | Updated expected JSON string in test to include kernelStack field |
| mem/mem_linux_test.go | Added KernelStack values to test cases where the field is present in corresponding test data files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dc33c11 to
c6f4d8b
Compare
c6f4d8b to
0044053
Compare
This was referenced Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a PR under #1884. But this PR moves KernelStack field to ExVirtualMemory because that is Linux only .