1
0
mirror of https://github.com/EnderIce2/Fennix.git synced 2025-07-13 00:09:16 +00:00
Files
.vscode
Architecture
Core
Library
Bitmap.cpp
String.c
cxxabi.cpp
liballoc_1_1.c
liballoc_1_1.h
liballocimpl.cpp
printf.c
include
.gitignore
Doxyfile
Fennix Kernel.code-workspace
Kernel.cpp
LICENSE
Makefile
README.md
kernel.h
Fennix/Library/liballocimpl.cpp
2022-10-10 23:29:39 +03:00

15 lines
421 B
C++

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