mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-02 00:13:02 +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:
parent
ec93d6ffdc
commit
62ec6e5fe0
Notes:
sideshowbarker
2024-07-19 03:53:17 +09:00
Author: https://github.com/awesomekling
Commit: 62ec6e5fe0
7 changed files with 12 additions and 16 deletions
|
@ -56,7 +56,6 @@ int Process::sys$module_load(Userspace<const char*> user_path, size_t path_lengt
|
|||
auto payload = payload_or_error.value();
|
||||
auto storage = KBuffer::create_with_size(payload.size());
|
||||
memcpy(storage.data(), payload.data(), payload.size());
|
||||
payload.clear();
|
||||
|
||||
auto elf_image = make<ELF::Image>(storage.data(), storage.size());
|
||||
if (!elf_image->parse())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue