mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 06:58:22 +00:00
pmm_hhdmfree()
we had a pmm_hhdmalloc() but not a pmm_hhdmfree(), so that interface function is now implemented
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
void pmm_init();
|
void pmm_init();
|
||||||
void* pmm_alloc(size_t);
|
void* pmm_alloc(size_t);
|
||||||
void* pmm_hhdmalloc(size_t);
|
void* pmm_hhdmalloc(size_t);
|
||||||
|
void pmm_hhdmfree(void*, size_t);
|
||||||
void pmm_free(void*, size_t);
|
void pmm_free(void*, size_t);
|
||||||
void pmm_setused(void*, size_t);
|
void pmm_setused(void*, size_t);
|
||||||
|
|
||||||
|
|||||||
@@ -137,6 +137,10 @@ void* pmm_alloc(size_t count){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void pmm_hhdmfree(void* addr, size_t count){
|
||||||
|
pmm_free(addr - (size_t)limine_hhdm_offset, count);
|
||||||
|
}
|
||||||
|
|
||||||
void* pmm_hhdmalloc(size_t count){
|
void* pmm_hhdmalloc(size_t count){
|
||||||
void* alloc = pmm_alloc(count);
|
void* alloc = pmm_alloc(count);
|
||||||
if(!alloc) return NULL;
|
if(!alloc) return NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user