Skip to content

[cmds,kernel] Add meminfo -m option to display sorted main memory segments#2023

Merged
ghaerr merged 3 commits intomasterfrom
meminfo
Sep 17, 2024
Merged

[cmds,kernel] Add meminfo -m option to display sorted main memory segments#2023
ghaerr merged 3 commits intomasterfrom
meminfo

Conversation

@ghaerr
Copy link
Owner

@ghaerr ghaerr commented Sep 17, 2024

Adds meminfo -m to display all main memory usage sorted by segment address.

This option allows for easier-to-visualize main memory usage by address, for looking at how much main memory is used by applications and the sizes of the blocks beside each segment. It can also be used for system tuning when adjusting /bootopts parameters for seeing the memory blocks used by or available to applications, buffers and UMB.

The internal memory list is subsorted based on seg_add at boot, so there may an address which appears out of order, which is the case for the INITPROC used-once segment released at the end of kernel initialization (see below for screenshot).

Also cleaned up mem.c considerably, reducing code size.

Here's meminfo -m running with UMB with two sorted segment lists; the last two lines are the freed INITPROC segment, now being occupied by /bin/init code followed by some free space:
meminfo -m

@ghaerr ghaerr merged commit 09fde8c into master Sep 17, 2024
@ghaerr ghaerr deleted the meminfo branch September 17, 2024 22:44
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.

1 participant