UnnamedOS
pmm.h File Reference
#include <stdint.h>
+ Include dependency graph for pmm.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  pmm_flags_t { PMM_UNUSED, PMM_RESERVED, PMM_KERNEL, PMM_USER }
 information on who uses a page frame (needs to fit in TYPE_BITS)
 

Functions

void pmm_init ()
 Initializes the PMM. More...
 
uint32_t pmm_get_page (void *ptr, uint32_t offset)
 Returns to which page a given memory address belongs. More...
 
void * pmm_get_address (uint32_t page, uint32_t offset)
 Returns a memory address belonging to a given page. More...
 
void pmm_use (void *ptr, size_t len, pmm_flags_t flags, char *tag)
 Marks page frames for a given memory range as used or unused. More...
 
void * pmm_alloc (size_t len, pmm_flags_t flags)
 Allocates page frames. More...
 
void pmm_free (void *ptr, size_t len)
 Frees page frames. More...
 
pmm_flags_t pmm_check (void *ptr)
 Returns whether a page frame is used or unused. More...
 
void pmm_dump (void *ptr, size_t len)
 Dumps information on page frames for a given memory range. More...
 
uint32_t pmm_get_highest_kernel_page ()
 Returns the highest page used by the kernel. More...