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:
Idan Horowitz 2022-01-12 23:57:45 +02:00 committed by Brian Gianforcaro
commit 618f123463
Notes: sideshowbarker 2024-07-17 21:01:21 +09:00
4 changed files with 7 additions and 8 deletions

View file

@ -17,8 +17,8 @@ ConsolePort::ConsolePort(unsigned port, VirtIO::Console& console)
, m_console(console)
, m_port(port)
{
m_receive_buffer = make<Memory::RingBuffer>("VirtIO::ConsolePort Receive", RINGBUFFER_SIZE);
m_transmit_buffer = make<Memory::RingBuffer>("VirtIO::ConsolePort Transmit", RINGBUFFER_SIZE);
m_receive_buffer = make<Memory::RingBuffer>("VirtIO::ConsolePort Receive"sv, RINGBUFFER_SIZE);
m_transmit_buffer = make<Memory::RingBuffer>("VirtIO::ConsolePort Transmit"sv, RINGBUFFER_SIZE);
m_receive_queue = m_port == 0 ? 0 : m_port * 2 + 2;
m_transmit_queue = m_port == 0 ? 1 : m_port * 2 + 3;
}