mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-25 22:14:37 +00:00
15 lines
433 B
C++
15 lines
433 B
C++
#include <types.h>
|
|
#include <lock.hpp>
|
|
#include <memory.hpp>
|
|
|
|
NewLock(liballocLock);
|
|
|
|
EXTERNC int liballoc_lock() { return liballocLock.Lock(__FUNCTION__); }
|
|
EXTERNC int liballoc_unlock() { return liballocLock.Unlock(); }
|
|
EXTERNC void *liballoc_alloc(size_t Pages) { return KernelAllocator.RequestPages(Pages); }
|
|
EXTERNC int liballoc_free(void *Address, size_t Pages)
|
|
{
|
|
KernelAllocator.FreePages(Address, Pages);
|
|
return 0;
|
|
}
|