summaryrefslogtreecommitdiff
path: root/src/kernel/proc.c
diff options
context:
space:
mode:
authordzwdz2024-07-16 23:55:32 +0200
committerdzwdz2024-07-17 00:01:15 +0200
commit473112b1541cf81fa3670e0d1cb6de1c4a3281de (patch)
tree4df8f777e2150468e8866f4496e1de32b309ccda /src/kernel/proc.c
parente29f0e294ac841e2036fe514df4ed66f5d0ec46f (diff)
kernel: make kmalloc accept a numeric "tag" instead of a freeform description
This will both let me save space in the allocation header, and make the debugprint more readable.
Diffstat (limited to 'src/kernel/proc.c')
-rw-r--r--src/kernel/proc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel/proc.c b/src/kernel/proc.c
index 61c1dad..6cc1679 100644
--- a/src/kernel/proc.c
+++ b/src/kernel/proc.c
@@ -19,7 +19,7 @@ static void proc_prune_leaves(void);
Proc *proc_seed(void *data, size_t datalen) {
assert(!proc_first);
- proc_first = kzalloc(sizeof *proc_first, "init");
+ proc_first = kzalloc(sizeof *proc_first, TagProcess);
proc_first->state = PS_RUNNING;
proc_first->pages = pagedir_new();
proc_first->mount = vfs_mount_seed();
@@ -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");
+ Proc *child = kzalloc(sizeof *child, TagProcess);
if (flags & FORK_SHAREMEM) {
if (!parent->pages_refcount) {
- parent->pages_refcount = kmalloc(sizeof *parent->pages_refcount, "pagerefs");
+ parent->pages_refcount = kmalloc(sizeof *parent->pages_refcount, TagPageRefcount);
*parent->pages_refcount = 1;
}
*parent->pages_refcount += 1;