os/kernel/pmem.h

30 lines
588 B
C
Raw Normal View History

2020-07-25 16:54:37 -05:00
/**
* \file
*/
2019-03-11 09:32:55 -05:00
#ifndef PMEM_H
#define PMEM_H
#include <grub/multiboot2.h>
2019-03-11 09:32:55 -05:00
2020-07-25 16:54:37 -05:00
/**
* Initialize the physical memory manager
* \param tags The multiboot header
*/
void pmem_init(struct multiboot_boot_header_tag* tags);
2020-07-25 16:54:37 -05:00
/**
* Allocate physical frames
* \param num_pages The number of frames to allocate
* \return the physical address of the allocated frames
*/
2019-03-11 09:32:55 -05:00
void* pmem_alloc(int num_pages);
2020-07-25 16:54:37 -05:00
/**
* Free allocated physical frames
2020-07-27 19:02:09 -05:00
* \param start The address to start freeing at.
2020-07-25 16:54:37 -05:00
* \param num_pages The number of frames to free
*/
void pmem_free(void* start,int num_pages);
2019-03-11 09:32:55 -05:00
#endif