mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 12:05:07 +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:
parent
a1944ec966
commit
fc9ce22981
10 changed files with 64 additions and 62 deletions
|
@ -245,11 +245,8 @@ ByteBuffer CoreDump::create_notes_regions_data() const
|
|||
info.program_header_index = region_index++;
|
||||
|
||||
memory_region_info_buffer.append((void*)&info, sizeof(info));
|
||||
|
||||
auto name = region->name();
|
||||
if (name.is_null())
|
||||
name = String::empty();
|
||||
memory_region_info_buffer.append(name.characters(), name.length() + 1);
|
||||
// NOTE: The region name *is* null-terminated, so the following is ok:
|
||||
memory_region_info_buffer.append(region->name().characters_without_null_termination(), region->name().length() + 1);
|
||||
|
||||
regions_data += memory_region_info_buffer;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue