1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:48:10 +00:00

Kernel: Allow specifying a physical alignment when allocating

Some drivers may require allocating contiguous physical pages with
a specific alignment for the physical address.
This commit is contained in:
Tom 2020-12-05 22:49:24 -07:00 committed by Andreas Kling
parent d5472426ec
commit affb4ef01b
6 changed files with 29 additions and 23 deletions

View file

@ -35,10 +35,10 @@ class ContiguousVMObject final : public VMObject {
public:
virtual ~ContiguousVMObject() override;
static NonnullRefPtr<ContiguousVMObject> create_with_size(size_t);
static NonnullRefPtr<ContiguousVMObject> create_with_size(size_t, size_t physical_alignment = PAGE_SIZE);
private:
explicit ContiguousVMObject(size_t);
explicit ContiguousVMObject(size_t, size_t physical_alignment);
explicit ContiguousVMObject(const ContiguousVMObject&);
virtual const char* class_name() const override { return "ContiguousVMObject"; }