mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 17:48:37 +00:00
Kernel: Propagate overflow errors from Memory::page_round_up
Fixes #11402.
This commit is contained in:
parent
11599a3342
commit
33b78915d3
Notes:
sideshowbarker
2024-07-17 22:09:47 +09:00
Author: https://github.com/eggpi 🔰
Commit: 33b78915d3
Pull-request: https://github.com/SerenityOS/serenity/pull/11433
Issue: https://github.com/SerenityOS/serenity/issues/11402
Reviewed-by: https://github.com/awesomekling
31 changed files with 112 additions and 100 deletions
|
@ -22,7 +22,8 @@ static constexpr u16 pcm_sample_rate_maximum = 48000;
|
|||
|
||||
static ErrorOr<OwnPtr<Memory::Region>> allocate_physical_buffer(size_t size, StringView name)
|
||||
{
|
||||
auto vmobject = TRY(Memory::AnonymousVMObject::try_create_physically_contiguous_with_size(Memory::page_round_up(size)));
|
||||
auto rounded_size = TRY(Memory::page_round_up(size));
|
||||
auto vmobject = TRY(Memory::AnonymousVMObject::try_create_physically_contiguous_with_size(rounded_size));
|
||||
return TRY(MM.allocate_kernel_region_with_vmobject(move(vmobject), vmobject->size(), name, Memory::Region::Access::Write));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue