matos/core/allocArea.h
2021-10-01 22:21:11 +02:00

17 lines
346 B
C

#pragma once
#include "paging.h"
#include "stdarg.h"
struct memArea {
vaddr_t startAddr;
uint nbPages;
struct memArea *next;
struct memArea *prev;
};
void areaInit(vaddr_t firstMemUsed, vaddr_t lastUsed);
vaddr_t areaAlloc(unsigned int nbPages);
int areaFree(vaddr_t addr);
int areaAdd(vaddr_t addr, uint nbPages, int isFree);