pctl Display memory usage and process state

This commit is contained in:
2025-09-19 22:38:39 +02:00
parent 1af0d1f5bc
commit 2c0d50a401
2 changed files with 60 additions and 3 deletions

View File

@ -142,6 +142,12 @@ int32_t SYSCALL5(sys_processctl, pid1, cmd1, arg1, arg2, arg3) {
hal_strcpy(stat->name, p->name);
stat->state = p->state;
stat->kern = p->kern;
VasRange *range = p->vas;
while (range) {
stat->usemem += range->size;
range = range->next;
}
break;
}