mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
Kernel: Merge PurgeableVMObject into AnonymousVMObject
This implements memory commitments and lazy-allocation of committed memory.
This commit is contained in:
parent
b2a52f6208
commit
476f17b3f1
35 changed files with 937 additions and 564 deletions
|
@ -229,14 +229,12 @@ auto SharedBuffer::set_volatile_all(bool is_volatile, bool& was_purged) -> SetVo
|
|||
if (ref.pid == pid) {
|
||||
if (Region* region = ref.region.unsafe_ptr()) {
|
||||
switch (region->set_volatile(region->vaddr(), region->size(), is_volatile, was_purged)) {
|
||||
case Region::SetVolatileError::Success:
|
||||
if (!was_purged && was_purged)
|
||||
klog() << "Region @ " << region->vaddr() << " - " << region->vaddr().offset(region->size()) << " was purged!";
|
||||
return SetVolatileError::Success;
|
||||
case Region::SetVolatileError::NotPurgeable:
|
||||
return SetVolatileError::NotPurgeable;
|
||||
case Region::SetVolatileError::OutOfMemory:
|
||||
return SetVolatileError::OutOfMemory;
|
||||
case Region::SetVolatileError::Success:
|
||||
return SetVolatileError::Success;
|
||||
case Region::SetVolatileError::NotPurgeable:
|
||||
return SetVolatileError::NotPurgeable;
|
||||
case Region::SetVolatileError::OutOfMemory:
|
||||
return SetVolatileError::OutOfMemory;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue