Kernel: Remove VirtualRanges created in kmalloc memory
These were only used as stacks of kernel threads, but they can just as well be allocated as full pages from Heap
This commit is contained in:
@@ -18,8 +18,6 @@ namespace Kernel
|
||||
static BAN::ErrorOr<BAN::UniqPtr<VirtualRange>> create_to_vaddr(PageTable&, vaddr_t, size_t, PageTable::flags_t flags, bool preallocate_pages);
|
||||
// Create virtual range to virtual address range
|
||||
static BAN::ErrorOr<BAN::UniqPtr<VirtualRange>> create_to_vaddr_range(PageTable&, vaddr_t vaddr_start, vaddr_t vaddr_end, size_t, PageTable::flags_t flags, bool preallocate_pages);
|
||||
// Create virtual range in kernel memory with kmalloc
|
||||
static BAN::ErrorOr<BAN::UniqPtr<VirtualRange>> create_kmalloc(size_t);
|
||||
~VirtualRange();
|
||||
|
||||
BAN::ErrorOr<BAN::UniqPtr<VirtualRange>> clone(PageTable&);
|
||||
@@ -35,14 +33,13 @@ namespace Kernel
|
||||
void copy_from(size_t offset, const uint8_t* buffer, size_t bytes);
|
||||
|
||||
private:
|
||||
VirtualRange(PageTable&, bool preallocated, bool kmalloc);
|
||||
VirtualRange(PageTable&, bool preallocated);
|
||||
|
||||
void set_zero();
|
||||
|
||||
private:
|
||||
PageTable& m_page_table;
|
||||
const bool m_preallocated;
|
||||
const bool m_kmalloc;
|
||||
vaddr_t m_vaddr { 0 };
|
||||
size_t m_size { 0 };
|
||||
PageTable::flags_t m_flags { 0 };
|
||||
|
||||
Reference in New Issue
Block a user