Various things:

- putch syscall now directly calls Console::putChar().
- /proc/summary includes some info about kmalloc stats.
- Syscall entry is guarded by a simple spinlock.
- Unmap regions for crashed tasks.
This commit is contained in:
Andreas Kling 2018-10-23 15:19:02 +02:00
parent c80a1f39ce
commit ccd15e0590
Notes: sideshowbarker 2024-07-19 18:44:35 +09:00
5 changed files with 82 additions and 8 deletions

View file

@ -21,7 +21,7 @@ bool ProcFileSystem::initialize()
cli();
auto tasks = Task::allTasks();
char* buffer;
auto stringImpl = StringImpl::createUninitialized(tasks.size() * 64, buffer);
auto stringImpl = StringImpl::createUninitialized(tasks.size() * 128, buffer);
memset(buffer, 0, stringImpl->length());
char* ptr = buffer;
ptr += ksprintf(ptr, "PID OWNER STATE NAME\n");
@ -33,6 +33,7 @@ bool ProcFileSystem::initialize()
task->state(),
task->name().characters());
}
ptr += ksprintf(ptr, "kmalloc: alloc: %u / free: %u\n", sum_alloc, sum_free);
*ptr = '\0';
sti();
return ByteBuffer::copy((byte*)buffer, ptr - buffer);