17 lines
512 B
C
17 lines
512 B
C
|
#pragma once
|
||
|
#include "common.h"
|
||
|
#include <stdint.h>
|
||
|
#include <stddef.h>
|
||
|
|
||
|
|
||
|
uint32_t kmalloc(size_t sz, int align, uint32_t *phys);
|
||
|
|
||
|
//Allocate a chunk of memory, with size sz.
|
||
|
uint32_t kmalloc_a(size_t sz);
|
||
|
|
||
|
//Allocate a chunk of memory, with size sz. The physical address is returned as phys.
|
||
|
uint32_t kmalloc_p(size_t sz, uint32_t *phys);
|
||
|
|
||
|
//Allocate a chunk of memory, with size sz. The physical address is returned as phys. The memory must be page aligned.
|
||
|
uint32_t kmalloc_ap(size_t sz, uint32_t *phys);
|