MyOS Kernel
pmem.h File Reference
#include <grub/multiboot2.h>

Go to the source code of this file.

Functions

void pmem_init (struct multiboot_boot_header_tag *tags)
 
void * pmem_alloc (int num_pages)
 
void pmem_free (int start, int num_pages)
 

Function Documentation

◆ pmem_alloc()

void* pmem_alloc ( int  num_pages)

Allocate physical frames

Parameters
num_pagesThe number of frames to allocate
Returns
the physical address of the allocated frames

◆ pmem_free()

void pmem_free ( int  start,
int  num_pages 
)

Free allocated physical frames

Parameters
startThe address to start freeing at.
num_pagesThe number of frames to free

◆ pmem_init()

void pmem_init ( struct multiboot_boot_header_tag *  tags)

Initialize the physical memory manager

Parameters
tagsThe multiboot header