summaryrefslogtreecommitdiff
path: root/Kernel/Memory/VMObject.cpp
AgeCommit message (Collapse)Author
2022-08-24Kernel: Use RefPtr instead of LockRefPtr for PhysicalPageAndreas Kling
I believe this to be safe, as the main thing that LockRefPtr provides over RefPtr is safe copying from a shared LockRefPtr instance. I've inspected the uses of RefPtr<PhysicalPage> and it seems they're all guarded by external locking. Some of it is less obvious, but this is an area where we're making continuous headway.
2022-08-20Kernel: Make self-contained locking smart pointers their own classesAndreas Kling
Until now, our kernel has reimplemented a number of AK classes to provide automatic internal locking: - RefPtr - NonnullRefPtr - WeakPtr - Weakable This patch renames the Kernel classes so that they can coexist with the original AK classes: - RefPtr => LockRefPtr - NonnullRefPtr => NonnullLockRefPtr - WeakPtr => LockWeakPtr - Weakable => LockWeakable The goal here is to eventually get rid of the Lock* classes in favor of using external locking.
2022-01-15Kernel: Remove infallible VMObject resource factory functionscreator1creeper1
These infallible resource factory functions were only there to ease the conversion to the new factory functions. Since all child classes of VMObject now use the fallible resource factory functions, we don't need the infallible versions anymore.
2022-01-15Kernel: Make VMOBject construction OOM-awarecreator1creeper1
This commit moves the allocation of the resources required for VMObject from its constructors to the constructors of its child classes. We're making this change to give the child classes the chance to expose the fallibility of the allocation.
2022-01-08AK+Everywhere: Make FixedArray OOM-safecreator1creeper1
FixedArray now doesn't expose any infallible constructors anymore. Rather, it exposes fallible methods. Therefore, it can be used for OOM-safe code. This commit also converts the rest of the system to use the new API. However, as an example, VMObject can't take advantage of this yet, as we would have to endow VMObject with a fallible static construction method, which would require a very fundamental change to VMObject's whole inheritance hierarchy.
2021-08-22Kernel: Rename SpinLock => SpinlockAndreas Kling
2021-08-22Kernel: Rename SpinLockProtectedValue<T> => SpinLockProtected<T>Andreas Kling
2021-08-17Kernel+Userland: Remove global futexesAndreas Kling
We only ever use private futexes, so it doesn't make sense to carry around all the complexity required for global (cross-process) futexes.
2021-08-17Kernel: Port VMObject to ListedRefCountedAndreas Kling
The VMObject class now manages its own instance list (it was previously a member of MemoryManager.) Removal from the list is done safely on the last unref(), closing a race window in the previous implementation. Note that VMObject::all_instances() now has its own lock instead of using the global MM lock.
2021-08-06Kernel: Move Kernel/Memory/ code into Kernel::Memory namespaceAndreas Kling
2021-08-06Kernel: Rename Kernel/VM/ to Kernel/Memory/Andreas Kling
This directory isn't just about virtual memory, it's about all kinds of memory management.