My Kernel v0.1.0
kmalloc.h File Reference

Dynamic allocator for the kernel. More...

#include <kernel/types.h>
Include dependency graph for kmalloc.h:

Go to the source code of this file.

Enumerations

enum  kmalloc_flags
 Feature flags passed to the kmalloc function family.
 

Functions

void * kmalloc (size_t size, int flags)
 Allocate size bytes and return a pointer to the allocated memory. More...
 
void * kcalloc (size_t nmemb, size_t size, int flags)
 Allocate nmemb members of size bytes and initialize its content to 0. More...
 
void kfree (void *ptr)
 Free a pointer allocated through Kernel dynamic allocator.
 
void * krealloc (void *ptr, size_t size, int flags)
 Change the size of the given memory block. More...
 
void * krealloc_array (void *ptr, size_t nmemb, size_t size, int flags)
 Change the size of the given memory block. More...
 
void * kmalloc_dma (size_t size)
 Allocate an addressable memory buffer suitable for DMA operations. More...
 
void kfree_dma (void *dma_ptr)
 Free a buffer allocated through kmalloc_dma.
 

Detailed Description