diff options
author | Marvin Borner | 2021-07-03 22:03:09 +0200 |
---|---|---|
committer | Marvin Borner | 2021-07-03 22:03:09 +0200 |
commit | 794d10a744e70ab5f7acc29e105dc437403ca341 (patch) | |
tree | f75bcb410b18f59d365a70747c8f7c6b90291fe8 /kernel/features | |
parent | a81a011d738a0cbd36e0d4f8e17691424d6bb1a0 (diff) |
Very minor fixes
Diffstat (limited to 'kernel/features')
-rw-r--r-- | kernel/features/dev.c | 2 | ||||
-rw-r--r-- | kernel/features/mm.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/kernel/features/dev.c b/kernel/features/dev.c index c190a8a..24d00ad 100644 --- a/kernel/features/dev.c +++ b/kernel/features/dev.c @@ -114,7 +114,7 @@ res dev_poll(u32 *devs) } } - struct dev_listener *listener = zalloc(sizeof(*listener)); + struct dev_listener *listener = malloc(sizeof(*listener)); listener->group = group; listener->proc = proc_current(); list_add(dev_listeners[type], listener); diff --git a/kernel/features/mm.c b/kernel/features/mm.c index 736a5a4..64a7523 100644 --- a/kernel/features/mm.c +++ b/kernel/features/mm.c @@ -194,7 +194,7 @@ struct memory_range physical_alloc(u32 size) } } - panic("Out of physical memory!\n"); + panic("Out of physical memory (%d of %d)!\n", memory_used, memory_total); return memory_range(0, 0); } @@ -204,6 +204,11 @@ void physical_free(struct memory_range range) physical_set_free(range); } +void physical_print(void) +{ + printf("%d of %d\n", memory_used, memory_total); +} + /** * Virtual */ |