Use a freelist for GDT entries.

Tweak the kmalloc space layout a bit. Get the spawn stress test up
and running again.
This commit is contained in:
Andreas Kling 2018-11-01 16:23:12 +01:00
parent 9da4864a9a
commit c70afd045e
Notes: sideshowbarker 2024-07-19 18:34:40 +09:00
6 changed files with 40 additions and 21 deletions

View file

@ -106,13 +106,13 @@ static void spawn_stress()
{
dword lastAlloc = sum_alloc;
for (unsigned i = 0; i < 100; ++i) {
for (unsigned i = 0; i < 10000; ++i) {
int error;
Process::createUserProcess("/bin/id", (uid_t)100, (gid_t)100, (pid_t)0, error, nullptr, tty0);
kprintf("malloc stats: alloc:%u free:%u\n", sum_alloc, sum_free);
kprintf("malloc stats: alloc:%u free:%u page_aligned:%u eternal:%u\n", sum_alloc, sum_free, kmalloc_page_aligned, kmalloc_sum_eternal);
kprintf("delta:%u\n", sum_alloc - lastAlloc);
lastAlloc = sum_alloc;
sleep(600);
sleep(60);
}
for (;;) {
asm volatile("hlt");