mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
Kernel: Use KString for Region names
Replace the AK::String used for Region::m_name with a KString. This seems beneficial across the board, but as a specific data point, it reduces time spent in sys$set_mmap_name() by ~50% on test-js. :^)
This commit is contained in:
@@ -67,7 +67,11 @@ Thread::Thread(NonnullRefPtr<Process> process, NonnullOwnPtr<Region> kernel_stac
|
||||
m_tid = Process::allocate_pid().value();
|
||||
}
|
||||
|
||||
m_kernel_stack_region->set_name(String::formatted("Kernel stack (thread {})", m_tid.value()));
|
||||
{
|
||||
// FIXME: Go directly to KString
|
||||
auto string = String::formatted("Kernel stack (thread {})", m_tid.value());
|
||||
m_kernel_stack_region->set_name(KString::try_create(string));
|
||||
}
|
||||
|
||||
{
|
||||
ScopedSpinLock lock(g_tid_map_lock);
|
||||
|
||||
Reference in New Issue
Block a user