Commit Graph

10 Commits

Author SHA1 Message Date
Andreas Kling
9e15708aa0 Kernel: Convert VMObject & subclasses to east-const style 2021-07-22 09:17:02 +02:00
Andreas Kling
f244a25f71 Kernel: Rename VMObject::clone() => try_clone()
And fix an unsafe dereference in SharedInodeVMObject::try_clone()
to make it OOM-safe.
2021-07-11 19:09:02 +02:00
Andreas Kling
68f2250768 Kernel: Make VMObject::class_name() return a StringView 2021-07-11 17:57:52 +02:00
Andreas Kling
88d490566f Kernel: Rename various *VMObject::create*() => try_create()
try_*() implies that it can fail (and they all return RefPtr with
nullptr signalling failure.)
2021-07-11 17:55:29 +02:00
Brian Gianforcaro
65d5f81afc Kernel: Make PrivateInodeVMObject factory APIs OOM safe 2021-05-29 09:04:05 +02:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Tom
b2a52f6208 Kernel: Implement lazy committed page allocation
By designating a committed page pool we can guarantee to have physical
pages available for lazy allocation in mappings. However, when forking
we will overcommit. The assumption is that worst-case it's better for
the fork to die due to insufficient physical memory on COW access than
the parent that created the region. If a fork wants to ensure that all
memory is available (trigger a commit) then it can use madvise.

This also means that fork now can gracefully fail if we don't have
enough physical pages available.
2021-01-01 23:43:44 +01:00
Andreas Kling
48bbfe51fb Kernel: Add some InodeVMObject type assertions in Region::clone()
Let's make sure that we're never cloning shared inode-backed objects
as if they were private, and vice versa.
2020-03-01 11:23:10 +01:00
Andreas Kling
5f7056d62c Kernel: Expose the VMObject type of each Region in /proc/PID/vm 2020-02-28 23:25:40 +01:00
Andreas Kling
651417a085 Kernel: Split InodeVMObject into two subclasses
We now have PrivateInodeVMObject and SharedInodeVMObject, corresponding
to MAP_PRIVATE and MAP_SHARED respectively.

Note that PrivateInodeVMObject is not used yet.
2020-02-28 20:20:35 +01:00