mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 19:19:30 +00:00
Kernel: Make ContiguousVMObject factory API OOM safe
This commit is contained in:
parent
cb45b2c001
commit
864b1a65e3
Notes:
sideshowbarker
2024-07-18 17:15:26 +09:00
Author: https://github.com/bgianfo
Commit: 864b1a65e3
Pull-request: https://github.com/SerenityOS/serenity/pull/7520
Reviewed-by: https://github.com/supercomputer7
3 changed files with 17 additions and 11 deletions
|
@ -7,18 +7,18 @@
|
|||
#pragma once
|
||||
|
||||
#include <Kernel/PhysicalAddress.h>
|
||||
#include <Kernel/VM/MemoryManager.h>
|
||||
#include <Kernel/VM/VMObject.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
class ContiguousVMObject final : public VMObject {
|
||||
public:
|
||||
virtual ~ContiguousVMObject() override;
|
||||
|
||||
static NonnullRefPtr<ContiguousVMObject> create_with_size(size_t, size_t physical_alignment = PAGE_SIZE);
|
||||
static RefPtr<ContiguousVMObject> create_with_size(size_t, size_t physical_alignment = PAGE_SIZE);
|
||||
|
||||
private:
|
||||
explicit ContiguousVMObject(size_t, size_t physical_alignment);
|
||||
explicit ContiguousVMObject(size_t, NonnullRefPtrVector<PhysicalPage>&);
|
||||
explicit ContiguousVMObject(const ContiguousVMObject&);
|
||||
|
||||
virtual const char* class_name() const override { return "ContiguousVMObject"; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue