21 lines
338 B
C
21 lines
338 B
C
#ifndef PMM_PMM_H_
|
|
#define PMM_PMM_H_
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include "spinlock.h"
|
|
#include "bitmap/bitmap.h"
|
|
|
|
typedef struct {
|
|
SpinLock spinlock;
|
|
BitMap self;
|
|
} PhysMem;
|
|
|
|
extern PhysMem PHYS_MEM;
|
|
|
|
void pmm_init(void);
|
|
void *pmm_alloc(size_t pages);
|
|
void pmm_free(uintptr_t ptr, size_t pages);
|
|
|
|
#endif // PMM_PMM_H_
|