mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:38:10 +00:00
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.
This commit is contained in:
parent
55c722096d
commit
f6179ad9f9
5 changed files with 26 additions and 20 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue