mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:48:11 +00:00
Kernel: Make AnonymousVMObject COW-Bitmap allocation OOM-fallible
This commit is contained in:
parent
871a53db76
commit
8030e2a88f
5 changed files with 35 additions and 21 deletions
|
@ -153,7 +153,7 @@ ErrorOr<Region*> AddressSpace::try_allocate_split_region(Region const& source_re
|
|||
size_t page_offset_in_source_region = (offset_in_vmobject - source_region.offset_in_vmobject()) / PAGE_SIZE;
|
||||
for (size_t i = 0; i < region->page_count(); ++i) {
|
||||
if (source_region.should_cow(page_offset_in_source_region + i))
|
||||
region->set_should_cow(i, true);
|
||||
TRY(region->set_should_cow(i, true));
|
||||
}
|
||||
return region;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue