matos/core/allocArea.h

17 lines
346 B
C
Raw Normal View History

2021-02-10 23:22:57 +01:00
#pragma once
#include "paging.h"
2021-08-09 09:26:10 +02:00
#include "stdarg.h"
2021-02-10 23:22:57 +01:00
2021-08-19 16:44:47 +02:00
struct memArea {
vaddr_t startAddr;
uint nbPages;
struct memArea *next;
struct memArea *prev;
};
void areaInit(vaddr_t firstMemUsed, vaddr_t lastUsed);
2021-04-10 00:24:02 +02:00
vaddr_t areaAlloc(unsigned int nbPages);
int areaFree(vaddr_t addr);
2021-08-09 09:26:10 +02:00
int areaAdd(vaddr_t addr, uint nbPages, int isFree);