Remove unused SmartHeap class

This commit is contained in:
EnderIce2
2024-08-13 07:37:20 +03:00
parent e2e9cfe84d
commit 31dca2e9a6
5 changed files with 22 additions and 111 deletions

View File

@ -1,25 +0,0 @@
#include <memory.hpp>
namespace Memory
{
SmartHeap::SmartHeap(size_t Size, VirtualMemoryArea *vma)
{
if (vma)
{
this->vma = vma;
this->Object = vma->RequestPages(TO_PAGES(Size));
}
else
this->Object = kmalloc(Size);
this->ObjectSize = Size;
memset(this->Object, 0, Size);
}
SmartHeap::~SmartHeap()
{
if (this->vma)
this->vma->FreePages(this->Object, TO_PAGES(this->ObjectSize));
else
kfree(this->Object);
}
}