1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00

Show the amount of memory in GraphicsBitmaps in /bin/top.

This seems like an extremely relevant metric to track.
This commit is contained in:
Andreas Kling 2019-02-05 09:27:27 +01:00
parent b1e054ffe8
commit 41567c5bb9
6 changed files with 37 additions and 13 deletions

View file

@ -488,7 +488,7 @@ ByteBuffer procfs$all(InodeIdentifier)
auto processes = Process::all_processes();
StringBuilder builder;
auto build_process_line = [&builder] (Process* process) {
builder.appendf("%u,%u,%u,%u,%u,%u,%u,%s,%u,%u,%s,%s,%u,%u,%u\n",
builder.appendf("%u,%u,%u,%u,%u,%u,%u,%s,%u,%u,%s,%s,%u,%u,%u,%u\n",
process->pid(),
process->times_scheduled(),
process->tty() ? process->tty()->pgid() : 0,
@ -503,7 +503,8 @@ ByteBuffer procfs$all(InodeIdentifier)
process->name().characters(),
process->amount_virtual(),
process->amount_resident(),
process->amount_shared()
process->amount_shared(),
process->amount_in_bitmaps()
);
};
build_process_line(Scheduler::colonel());