diff options
Diffstat (limited to 'src/kernel/proc.c')
-rw-r--r-- | src/kernel/proc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/kernel/proc.c b/src/kernel/proc.c index 26b9e3a..8182a54 100644 --- a/src/kernel/proc.c +++ b/src/kernel/proc.c @@ -19,12 +19,12 @@ static void proc_prune_leaves(void); Proc *proc_seed(void *data, size_t datalen) { assert(!proc_first); - proc_first = kzalloc(sizeof *proc_first); + proc_first = kzalloc(sizeof *proc_first, "init"); proc_first->state = PS_RUNNING; proc_first->pages = pagedir_new(); proc_first->mount = vfs_mount_seed(); proc_first->globalid = next_pid++; - proc_first->_handles = kzalloc(sizeof(Handle) * HANDLE_MAX); + proc_first->_handles = kzalloc(sizeof(Handle) * HANDLE_MAX, "init fds"); proc_first->pns = proc_first; proc_first->localid = 1; @@ -47,11 +47,11 @@ Proc *proc_seed(void *data, size_t datalen) { } Proc *proc_fork(Proc *parent, int flags) { - Proc *child = kzalloc(sizeof *child); + Proc *child = kzalloc(sizeof *child, "proc"); if (flags & FORK_SHAREMEM) { if (!parent->pages_refcount) { - parent->pages_refcount = kmalloc(sizeof *parent->pages_refcount); + parent->pages_refcount = kmalloc(sizeof *parent->pages_refcount, "pagerefs"); *parent->pages_refcount = 1; } *parent->pages_refcount += 1; @@ -96,14 +96,14 @@ Proc *proc_fork(Proc *parent, int flags) { if (flags & FORK_SHAREHANDLE) { if (!parent->handles_refcount) { - parent->handles_refcount = kmalloc(sizeof *parent->handles_refcount); + parent->handles_refcount = kmalloc(sizeof *parent->handles_refcount, "fd refs"); *parent->handles_refcount = 1; } *parent->handles_refcount += 1; child->handles_refcount = parent->handles_refcount; child->_handles = parent->_handles; } else { - child->_handles = kzalloc(sizeof(Handle) * HANDLE_MAX); + child->_handles = kzalloc(sizeof(Handle) * HANDLE_MAX, "handles"); for (hid_t h = 0; h < HANDLE_MAX; h++) { child->_handles[h] = parent->_handles[h]; if (child->_handles[h]) |