mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
Kernel: Remove bitrotted "spawn stress" code.
This was something I used during early kernel development to spam creation of new processes to see if the kernel could handle it.
This commit is contained in:
parent
3fce2fb205
commit
38b13f1508
Notes:
sideshowbarker
2024-07-19 13:05:53 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/38b13f15085
1 changed files with 0 additions and 24 deletions
|
@ -34,8 +34,6 @@
|
|||
#include <Kernel/TTY/VirtualConsole.h>
|
||||
#include <Kernel/VM/MemoryManager.h>
|
||||
|
||||
//#define STRESS_TEST_SPAWNING
|
||||
|
||||
VirtualConsole* tty0;
|
||||
VirtualConsole* tty1;
|
||||
VirtualConsole* tty2;
|
||||
|
@ -51,24 +49,6 @@ SerialDevice* ttyS2;
|
|||
SerialDevice* ttyS3;
|
||||
VFS* vfs;
|
||||
|
||||
#ifdef STRESS_TEST_SPAWNING
|
||||
[[noreturn]] static void spawn_stress()
|
||||
{
|
||||
u32 last_sum_alloc = sum_alloc;
|
||||
|
||||
for (unsigned i = 0; i < 10000; ++i) {
|
||||
int error;
|
||||
Process::create_user_process("/bin/true", (uid_t)100, (gid_t)100, (pid_t)0, error, {}, {}, tty0);
|
||||
dbgprintf("malloc stats: alloc:%u free:%u eternal:%u !delta:%u\n", sum_alloc, sum_free, kmalloc_sum_eternal, sum_alloc - last_sum_alloc);
|
||||
last_sum_alloc = sum_alloc;
|
||||
sleep(60);
|
||||
}
|
||||
for (;;) {
|
||||
asm volatile("hlt");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[[noreturn]] static void init_stage2()
|
||||
{
|
||||
Syscall::initialize();
|
||||
|
@ -165,10 +145,6 @@ VFS* vfs;
|
|||
}
|
||||
system_server_process->set_priority(Process::HighPriority);
|
||||
|
||||
#ifdef STRESS_TEST_SPAWNING
|
||||
Process::create_kernel_process("spawn_stress", spawn_stress);
|
||||
#endif
|
||||
|
||||
current->process().sys$exit(0);
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue