1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:57:35 +00:00

Kernel+AK: Eliminate a couple of temporary String allocations

This commit is contained in:
Daniel Bertalan 2021-12-30 13:43:45 +01:00 committed by Andreas Kling
parent 726c023f9e
commit 1d2f78682b
7 changed files with 10 additions and 10 deletions

View file

@ -520,7 +520,7 @@ ErrorOr<FlatPtr> Process::sys$allocate_tls(Userspace<const char*> initial_data,
return EINVAL;
auto range = TRY(address_space().try_allocate_range({}, size));
auto* region = TRY(address_space().allocate_region(range, String("Master TLS"), PROT_READ | PROT_WRITE));
auto* region = TRY(address_space().allocate_region(range, "Master TLS"sv, PROT_READ | PROT_WRITE));
m_master_tls_region = region->make_weak_ptr();
m_master_tls_size = size;