/** * @brief Allocate a memory buffer. * @param size how many bytes to allocate. * @param phys the memory address the buffer starts in. * @return a pointer to the memory buffer. */ void *kmalloc_py(unsigned int size, unsigned int *phys) { return kmalloc_real(size, 0, phys); }
/** * @brief Allocate a memory buffer aligned to the bounds of a new page. * @param size how many bytes to allocate. * @return the pointer to the memory buffer. */ void *kmalloc_al(unsigned int size) { return kmalloc_real(size, 1, 0); }
/** * @brief Allocate a memory buffer aligned to the bounds of a new page. * @param size how many bytes to allocate. * @param phys the memory address the buffer starts in. * @return a pointer to the memory buffer. */ void *kmalloc_ap(unsigned int size, unsigned int *phys) { return kmalloc_real(size, 1, phys); }
uint32_t kmalloc_ap(uint32_t size, uint32_t *phys) { return kmalloc_real(size, 1, phys); }
uint32_t kmalloc_a(uint32_t size) { return kmalloc_real(size, 1, 0); }
uint32_t kmalloc(uint32_t size) { return kmalloc_real(size, 0, 0); }