2019-08-07 18:06:17 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Kernel/VM/PhysicalAddress.h>
|
|
|
|
#include <Kernel/VM/VMObject.h>
|
|
|
|
|
2019-12-09 19:12:38 +01:00
|
|
|
class AnonymousVMObject : public VMObject {
|
2019-08-07 18:06:17 +02:00
|
|
|
public:
|
|
|
|
virtual ~AnonymousVMObject() override;
|
|
|
|
|
|
|
|
static NonnullRefPtr<AnonymousVMObject> create_with_size(size_t);
|
|
|
|
static NonnullRefPtr<AnonymousVMObject> create_for_physical_range(PhysicalAddress, size_t);
|
|
|
|
virtual NonnullRefPtr<VMObject> clone() override;
|
|
|
|
|
2019-12-09 19:12:38 +01:00
|
|
|
protected:
|
2019-08-07 18:06:17 +02:00
|
|
|
explicit AnonymousVMObject(size_t);
|
|
|
|
explicit AnonymousVMObject(const AnonymousVMObject&);
|
2019-12-09 19:12:38 +01:00
|
|
|
|
|
|
|
private:
|
2019-08-07 18:06:17 +02:00
|
|
|
AnonymousVMObject(PhysicalAddress, size_t);
|
|
|
|
|
|
|
|
AnonymousVMObject& operator=(const AnonymousVMObject&) = delete;
|
|
|
|
AnonymousVMObject& operator=(AnonymousVMObject&&) = delete;
|
|
|
|
AnonymousVMObject(AnonymousVMObject&&) = delete;
|
|
|
|
|
|
|
|
virtual bool is_anonymous() const override { return true; }
|
|
|
|
};
|