aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/include/mm/pmm.h
blob: 36c5f833782c3f62bd296139da616285772d3b58 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef PMM_H
#define PMM_H

#include <stdint.h>
#include <stddef.h>
#include <limine.h>

struct MemRegion {
    uint64_t base;
    uint64_t length;
    uint64_t bitmap_pos; // where the region starts on the bitmap index
};

struct BitmapInfo {
    uint64_t* address;
    uint64_t ind_length;
    int region_count;
    MemRegion* regions[];
};

void pmm_init(limine_memmap_response* memmap);
void* palloc();
void pfree(void* page);

#endif