blob: 6cc9983c7dee728afb0cbfe257b00e59bf6c9c1a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/*
* Copyright (c) 2020, Liav A. <liavalb@hotmail.co.il>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#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 RefPtr<ContiguousVMObject> try_create_with_size(size_t, size_t physical_alignment = PAGE_SIZE);
private:
explicit ContiguousVMObject(size_t, NonnullRefPtrVector<PhysicalPage>&);
explicit ContiguousVMObject(const ContiguousVMObject&);
virtual StringView class_name() const override { return "ContiguousVMObject"sv; }
virtual RefPtr<VMObject> clone() override;
ContiguousVMObject& operator=(const ContiguousVMObject&) = delete;
ContiguousVMObject& operator=(ContiguousVMObject&&) = delete;
ContiguousVMObject(ContiguousVMObject&&) = delete;
virtual bool is_contiguous() const override { return true; }
};
}
|