aboutsummaryrefslogtreecommitdiff
path: root/kernel/features/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/features/proc.c')
-rw-r--r--kernel/features/proc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/features/proc.c b/kernel/features/proc.c
index a17a655..52627ed 100644
--- a/kernel/features/proc.c
+++ b/kernel/features/proc.c
@@ -148,6 +148,16 @@ void proc_exit(struct proc *proc, struct regs *r, s32 status)
proc->name[0] ? proc->name : "UNKNOWN", proc->pid, status,
status == 0 ? "success" : "error");
+ if (proc->memory->head) {
+ printf("Process leaked memory:\n");
+ struct node *iterator = proc->memory->head;
+ while (iterator) {
+ struct memory_proc_link *link = iterator->data;
+ printf("\t-> 0x%x: %dB\n", link->vrange.base, link->vrange.size);
+ iterator = iterator->next;
+ }
+ }
+
stack_destroy(proc->messages);
list_destroy(proc->memory); // TODO: Decrement memory ref links
virtual_destroy_dir(proc->page_dir);