mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:37:35 +00:00
Kernel: Use StringView instead of String in RingBuffer's constructor
This String was being copied into a KString internally anyways.
This commit is contained in:
parent
792b8ca13c
commit
618f123463
4 changed files with 7 additions and 8 deletions
|
@ -10,8 +10,8 @@
|
|||
|
||||
namespace Kernel::Memory {
|
||||
|
||||
RingBuffer::RingBuffer(String region_name, size_t capacity)
|
||||
: m_region(MM.allocate_contiguous_kernel_region(page_round_up(capacity).release_value_but_fixme_should_propagate_errors(), move(region_name), Region::Access::Read | Region::Access::Write).release_value())
|
||||
RingBuffer::RingBuffer(StringView region_name, size_t capacity)
|
||||
: m_region(MM.allocate_contiguous_kernel_region(page_round_up(capacity).release_value_but_fixme_should_propagate_errors(), region_name, Region::Access::Read | Region::Access::Write).release_value())
|
||||
, m_capacity_in_bytes(capacity)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue