Sound Open Firmware
Loading...
Searching...
No Matches
vpage.h File Reference
Include dependency graph for vpage.h:

Go to the source code of this file.

Functions

void * vpage_alloc (unsigned int pages)
 Allocate virtual pages Allocates a specified number of contiguous virtual memory pages by mapping physical pages.
void vpage_free (void *ptr)
 Free virtual pages Frees previously allocated virtual memory pages and unmaps them.

Function Documentation

◆ vpage_alloc()

void * vpage_alloc ( unsigned int pages)

Allocate virtual pages Allocates a specified number of contiguous virtual memory pages by mapping physical pages.

Parameters
[in]pagesNumber of pages (usually 4kB large) to allocate.
Returns
Pointer to the allocated virtual memory region, or NULL on failure.

◆ vpage_free()

void vpage_free ( void * ptr)

Free virtual pages Frees previously allocated virtual memory pages and unmaps them.

Parameters
[in]ptrPointer to the memory pages to free.