Files
my-os-project2/kernel/pmm/pmm.h

21 lines
347 B
C

#ifndef PMM_PMM_H_
#define PMM_PMM_H_
#include <stddef.h>
#include <stdint.h>
#include "bitmap/bitmap.h"
#include "spinlock/spinlock.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_