mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 22:55:23 +00:00
Kernel: Don't allocate memory for names of processes and threads
Instead, use the FixedCharBuffer class to ensure we always use a static buffer storage for these names. This ensures that if a Process or a Thread were created, there's a guarantee that setting a new name will never fail, as only copying of strings should be done to that static storage. The limits which are set are 32 characters for processes' names and 64 characters for thread names - this is because threads' names could be more verbose than processes' names.
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Kernel {
|
||||
|
||||
UNMAP_AFTER_INIT void SyncTask::spawn()
|
||||
{
|
||||
MUST(Process::create_kernel_process(KString::must_create("VFS Sync Task"sv), [] {
|
||||
MUST(Process::create_kernel_process("VFS Sync Task"sv, [] {
|
||||
dbgln("VFS SyncTask is running");
|
||||
while (!Process::current().is_dying()) {
|
||||
VirtualFileSystem::sync();
|
||||
|
||||
Reference in New Issue
Block a user