aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/user/process.c
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2015-03-09 15:43:44 +0100
committerAlex Auvolat <alex@adnab.me>2015-03-09 15:43:44 +0100
commit436418e575b68fd7e85f7fdaf039e03874ec1cb9 (patch)
treea18413eaa89ce9a9fffb40617b5dddfef9bc5d97 /src/kernel/user/process.c
parenta9a2ea9125f89347e0aa038a136ebd43e6b251b4 (diff)
downloadkogata-436418e575b68fd7e85f7fdaf039e03874ec1cb9.tar.gz
kogata-436418e575b68fd7e85f7fdaf039e03874ec1cb9.zip
Nullfs now uses pager.
Diffstat (limited to 'src/kernel/user/process.c')
-rw-r--r--src/kernel/user/process.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/kernel/user/process.c b/src/kernel/user/process.c
index 1b3013b..7433517 100644
--- a/src/kernel/user/process.c
+++ b/src/kernel/user/process.c
@@ -639,6 +639,24 @@ bool munmap(process_t *proc, void* addr) {
return true;
}
+void dbg_dump_proc_memmap(process_t *proc) {
+ //WARNING not thread safe
+
+ dbg_printf("/ Region map for process %d\n", proc->pid);
+
+ for (user_region_t *it = proc->regions; it != 0; it = it->next_in_proc) {
+ dbg_printf("| 0x%p - 0x%p : (0x%p) ", it->addr, it->addr + it->size, it->pager);
+ if (it->file != 0) {
+ dbg_printf("mmap of 0x%p", it->file);
+ } else {
+ dbg_printf("private");
+ }
+ dbg_printf(", %d pages\n", hashtbl_count(it->pager->pages));
+ }
+
+ dbg_printf("\\ ----\n");
+}
+
// =============================== //
// USER MEMORY PAGE FAULT HANDLERS //
// =============================== //