#ifndef MEMORY_H
#define MEMORY_H
#include "kstructs.h"
#include "pagetab.h"
#define GDT 0x0000000000000000L
#define IDT 0x0000000000000800L
#define OSCode 0x0000000000001000L
#define OSData 0x0000000000010000L
#define StaticPort 0x000000000006F000L
#define TaskStruct 0x0000000000080000L
#define TempUserCode 0x0000000000095000L
#define TempUserData 0x0000000000096000L
#define TempUStack 0x0000000000098000L
#define PageMap 0x0000000000100000L
#define UserCode 0x0000000000400000L
#define UserData 0x0000000000600000L
#define KernelStack 0x0000000000800000L
#define UserStack 0x0000000000a00000L
#define VAddr 0x0000008000000000L
#define PageSize 0x1000
#define KbdPort (struct MessagePort *)0x6F010L
#define ConsolePort (struct MessagePort *)0x6F020L
#define FSPort (struct MessagePort *)0x6F030L
#define OsCodeSeg 0x8
#define OsDataSeg 0x10
#define code64 0x18
#define data64 0x20
#define udata64 0x28
#define user64 0x30
#define tssd64 0x38
#define tsslength 0x80
void *AllocMem(long sizeRequested, struct MemStruct *list);
void *AllocKMem(long sizeRequested);
void *AllocUMem(long sizeRequested);
void *AllocSharedMem(long sizeRequested);
void DeallocMem(void *list);
void DeallocSharedMem(long pid);
void DeallocKMem(long pid);
#endif