mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-05 04:19:16 +00:00
Update files
This commit is contained in:
14
Library/liballocimpl.cpp
Normal file
14
Library/liballocimpl.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include <types.h>
|
||||
#include <lock.hpp>
|
||||
#include <memory.hpp>
|
||||
|
||||
NEWLOCK(liballocLock);
|
||||
|
||||
EXTERNC int liballoc_lock() { return liballocLock.Lock(); }
|
||||
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;
|
||||
}
|
Reference in New Issue
Block a user