OurOS
0.1
Operating System built by McGill Students
Loading...
Searching...
No Matches
kalloc.h
1
#ifndef KALLOC_H
2
#define KALLOC_H
3
4
#include <stdbool.h>
5
#include <stdint.h>
6
7
#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1)
8
#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))
9
10
struct
frame {
11
struct
frame *next;
// Kept to track free list
12
bool
free;
// Whether or not page is free to allocate (0 = used, 1 = free)
13
uint64_t pfn;
14
};
15
16
int
kalloc_init(
void
);
17
18
#endif
include
kernel
mm
kalloc.h
Generated by
1.9.8