RossComputerGuy/stardustos

View on GitHub
newland/arch/x86/src/alloc.c

Summary

Maintainability
Test Coverage
/**
* NewLand Kernel - (C) 2019 Tristan Ross
*/
#include <newland/arch/mem.h>
#include <newland/alloc.h>
#include <liballoc.h>
 
The function `liballoc_lock` is never used.
int liballoc_lock() {
return 0;
}
 
The function `liballoc_unlock` is never used.
int liballoc_unlock() {
return 0;
}
 
The function `liballoc_alloc` is never used.
void* liballoc_alloc(int pages) {
return (void*)mem_alloc(get_krnlpgdir(), pages * PAGE_SIZE, 1, 0);
}
 
The function `liballoc_free` is never used.
int liballoc_free(void* ptr, int pages) {
mem_free(get_krnlpgdir(), (uint32_t)ptr, pages * PAGE_SIZE);
return 0;
}