#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
◆ alloc_frame()
| struct frame * alloc_frame |
( |
const char * |
identifier | ) |
|
Allocates a frame and returns a pointer to it. The allocated frame will be zeroed out.
- Parameters
-
| identifier | A string identifier for the frame (for debugging purposes). |
- Returns
- A pointer to the allocated frame.
◆ frame_init()
Initializes the frame allocator and memory map.
◆ frame_to_pfn()
Returns the PFN of a frame.
- Parameters
-
| frame | A pointer to the frame. |
- Returns
- The PFN of the frame.
◆ free_frame()
| void free_frame |
( |
struct frame * |
frame | ) |
|
Frees a frame.
- Parameters
-
| frame | A pointer to the frame to free. |
- Note
- The frame will only be truly freed if its reference count drops to 0.
◆ pfn_to_phys()
Converts a PFN to a physical address.
- Parameters
-
- Returns
- The physical address.