mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-06 03:02:55 +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:
parent
0d30f558f4
commit
3fd4997fc2
Notes:
sideshowbarker
2024-07-17 06:00:02 +09:00
Author: https://github.com/supercomputer7
Commit: 3fd4997fc2
Pull-request: https://github.com/SerenityOS/serenity/pull/20037
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
22 changed files with 102 additions and 110 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue