#include <page.h>
#include <list.h>
Go to the source code of this file.
Data Structures | |
struct | Frame |
struct | FrameAllocator |
Defines | |
#define | FRAME_SIZE PAGE_SIZE |
#define | FRAME_ADDRESS_BITS (32 - PAGE_SHIFT) |
#define | FRAME_ALIGNMENT_BITS (PAGE_SHIFT - 1) |
#define | FRAME_ALIGNMENT_MAXIMUM (FRAME_ADDRESS_BITS - 1) |
#define | FRAME_ADDRESS(frame) ((frame) -> address * FRAME_SIZE) |
Typedefs | |
typedef unsigned int | FrameAddress |
typedef unsigned int | FrameAlignment |
Functions | |
int | frame_allocator_initialize (FrameAddress start, FrameAddress end) |
Initializes the frame allocator. | |
void | frame_allocator_reserve (FrameAddress start, FrameAddress end) |
Reserve frame from the allocator. | |
Frame * | frame_allocate_within (FrameAlignment alignment, FrameAddress start, FrameAddress end) |
Allocate a frame within a memory region. | |
Frame * | frame_allocate (FrameAlignment alignment) |
Allocate a frame. | |
void | frame_free (Frame *frame) |
Free a frame. | |
unsigned int | frame_availability (void) |
The number of available frames for allocation. |
Interface for physical page frame allocation.
|
Allocate a frame. Allocate a frame from anywhere within the managed physical memory.
|
|
Allocate a frame within a memory region. Allocates a frame of the specified alignment within a given region of the physical address space.
|
|
Initializes the frame allocator. Initialize the frame allocator to manage a specified region of physical memory.
|
|
Reserve frame from the allocator. Reserves page frames from the allocator so that they may not be used.
|
|
The number of available frames for allocation. Return the number of frames available for allocation, if allocated at the least alignment possible.
|
|
Free a frame. Return the frame to the free list
|