summaryrefslogtreecommitdiff
path: root/Kernel/init.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-12-26 21:31:46 +0100
committerAndreas Kling <awesomekling@gmail.com>2018-12-26 21:47:15 +0100
commitf6179ad9f9ba0277fe5f0767cb0985388bf1ee20 (patch)
treea2526b71c855f3d282fbc98eb1f7566bce1ad002 /Kernel/init.cpp
parent55c722096da724ba93f0a2c5e1f4cb1f59cf9f0e (diff)
downloadserenity-f6179ad9f9ba0277fe5f0767cb0985388bf1ee20.zip
Add slightly better kmalloc_aligned() and kfree_aligned().
Process page directories can now actually be freed. This could definitely be implemented in a nicer, less wasteful way, but this works for now. The spawn stress test can now run for a lot longer but eventually dies due to kmalloc running out of memory.
Diffstat (limited to 'Kernel/init.cpp')
-rw-r--r--Kernel/init.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/init.cpp b/Kernel/init.cpp
index 1607abc7a5..96b8d7f407 100644
--- a/Kernel/init.cpp
+++ b/Kernel/init.cpp
@@ -40,8 +40,8 @@ static void spawn_stress()
for (unsigned i = 0; i < 10000; ++i) {
int error;
- Process::create_user_process("/bin/id", (uid_t)100, (gid_t)100, (pid_t)0, error, Vector<String>(), Vector<String>(), tty0);
- kprintf("malloc stats: alloc:%u free:%u page_aligned:%u eternal:%u\n", sum_alloc, sum_free, kmalloc_page_aligned, kmalloc_sum_eternal);
+ Process::create_user_process("/bin/true", (uid_t)100, (gid_t)100, (pid_t)0, error, Vector<String>(), Vector<String>(), tty0);
+ kprintf("malloc stats: alloc:%u free:%u eternal:%u ", sum_alloc, sum_free, kmalloc_sum_eternal);
kprintf("delta:%u\n", sum_alloc - lastAlloc);
lastAlloc = sum_alloc;
sleep(60);