1
0
mirror of https://github.com/EnderIce2/Fennix.git synced 2025-07-05 04:19:16 +00:00
Files
Fennix/Library/liballocimpl.cpp

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;
}