1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

Kernel: Remove OOM unsafe DoubleBuffer constructor

Remove this dangerous and now unused constructor.
This commit is contained in:
Brian Gianforcaro 2021-08-01 02:55:57 -07:00 committed by Andreas Kling
parent ca94a83337
commit cbb263e350
2 changed files with 0 additions and 6 deletions

View file

@ -26,11 +26,6 @@ OwnPtr<DoubleBuffer> DoubleBuffer::try_create(size_t capacity)
return adopt_own_if_nonnull(new (nothrow) DoubleBuffer(capacity, storage.release_nonnull()));
}
DoubleBuffer::DoubleBuffer(size_t capacity)
: DoubleBuffer(capacity, KBuffer::try_create_with_size(capacity * 2, Region::Access::Read | Region::Access::Write, "DoubleBuffer").release_nonnull())
{
}
DoubleBuffer::DoubleBuffer(size_t capacity, NonnullOwnPtr<KBuffer> storage)
: m_write_buffer(&m_buffer1)
, m_read_buffer(&m_buffer2)