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

Kernel: Make Inode::read_entire() return a KBuffer (not ByteBuffer)

ByteBuffer is backed by kmalloc heap memory which is a scarce resource.
This fixes an OOM panic when traversing a large directory.
This commit is contained in:
Andreas Kling 2020-08-11 19:47:24 +02:00
parent ec93d6ffdc
commit 62ec6e5fe0
7 changed files with 12 additions and 16 deletions

View file

@ -105,6 +105,9 @@ public:
size_t size() const { return m_impl->size(); }
size_t capacity() const { return m_impl->capacity(); }
void* end_pointer() { return data() + size(); }
const void* end_pointer() const { return data() + size(); }
void set_size(size_t size) { m_impl->set_size(size); }
const KBufferImpl& impl() const { return m_impl; }