old-trainOS/include/pmm.h

33 lines
527 B
C
Raw Permalink Normal View History

2015-08-09 00:42:56 +00:00
#pragma once
#include "multiboot.h"
2015-08-13 12:56:50 +00:00
#if defined(__cplusplus)
extern "C" {
#endif
2015-08-09 00:42:56 +00:00
/**
* Initializes physical memory management.
* @param mb The multi boot structure used for gathering information about free memory.
*/
void pmm_init(const MultibootStructure *mb);
/**
* Frees a page of physical memory.
*/
void pmm_free(void *pptr);
/**
* Allocates a page of physical memory.
*/
void *pmm_alloc(void);
/**
* Calculates the free memory in bytes.
*/
uint32_t pmm_calc_free(void);
2015-08-13 12:56:50 +00:00
#if defined(__cplusplus)
}
#endif