implements first free mem block
This commit is contained in:
@ -1,20 +1,4 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifndef ARCH_PMM_H
|
||||
#define ARCH_PMM_H
|
||||
|
||||
#define PMM_BLOCKS_PER_BYTE 8 // This is for the Bitmap
|
||||
#define PMM_BLOCK_SIZE 4096 // 4KiB
|
||||
#define PMM_BLOCK_ALIGN (PMM_BLOCK_SIZE) // must be aligned at 4KiB
|
||||
|
||||
void set_grub_mem_map(uint32_t addr, uint32_t len);
|
||||
uint32_t pmm_get_block_count(void);
|
||||
|
||||
int pmm_first_free(void);
|
||||
int pmm_first_free_s(size_t pages);
|
||||
|
||||
void pmm_init(size_t mem_size, uint32_t* bitmap);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user