X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_mm.h;h=1ef85c953182f2a16e0bb27e149c5e4a9418383c;hb=cfa61df0152c0dff3c78b9ef35f8b82bdf7506e1;hp=fb99af1d6212aa6af328d8b1259ae409f807e21e;hpb=d3b921a6aa5b34df62eead7904b6d969a1416798;p=16.git diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index fb99af1d..1ef85c95 100644 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -23,6 +23,7 @@ #include #include +//#include #include "src/lib/16_head.h" //++++mh #include "src/lib/16_in.h" @@ -33,7 +34,7 @@ #endif -#define SAVENEARHEAP 0x400 // space to leave in data segment +#define SAVENEARHEAP 0x200 // space to leave in data segment #define SAVEFARHEAP 0 // space to leave in far heap #define BUFFERSIZE 0x1000 // miscelanious, allways available buffer @@ -85,7 +86,7 @@ typedef void __based(__self) * memptr; //__based(seg) * memptr; typedef struct { - dword nearheap,farheap/*,hugeheap*/,EMSmem,XMSmem,mainmem; + dword nearheap,farheap,EMSmem,XMSmem,mainmem; } mminfotype; //========================================================================== @@ -109,11 +110,14 @@ extern void (* XMSaddr) (void); // far pointer to XMS driver #define PURGEMASK 0xfffc #define BASEATTRIBUTES 0 // unlocked, non purgable -#define MAXUMBS 10 +#define MAXUMBS 12 typedef struct mmblockstruct { - unsigned start,length; + word start,length; + //dword start,length; + //word start; + //dword length; unsigned attributes; memptr *useptr; // pointer to the segment start struct mmblockstruct huge *next; @@ -124,12 +128,12 @@ typedef struct { memptr bufferseg; boolean mmstarted, bombonerror, mmerror; - //void huge *hugeheap; void huge *farheap; void *nearheap; unsigned totalEMSpages,freeEMSpages,EMSpageframe,EMSpagesmapped,EMShandle; unsigned int EMSVer; - unsigned numUMBs,UMBbase[MAXUMBS]; + word numUMBs,UMBbase[MAXUMBS]; + //dword numUMBs,UMBbase[MAXUMBS]; mmblocktype huge mmblocks[MAXBLOCKS],huge *mmhead,huge *mmfree,huge *mmrover,huge *mmnew; } mminfo_t; @@ -159,7 +163,7 @@ unsigned MM_MapEMS(mminfo_t *mm); boolean MML_CheckForXMS(mminfo_t *mm); void MML_SetupXMS(mminfo_t *mm, mminfotype *mmi); void MML_ShutdownXMS(mminfo_t *mm); -void MML_UseSpace(unsigned segstart, unsigned seglength, mminfo_t *mm); +void MML_UseSpace(/*d*/word segstart, dword seglength, mminfo_t *mm); void MML_ClearBlock(mminfo_t *mm); void MM_Startup(mminfo_t *mm, mminfotype *mmi); @@ -174,7 +178,7 @@ void MM_ShowMemory(mminfo_t *mm); dword MM_UnusedMemory(mminfo_t *mm); dword MM_TotalFree(mminfo_t *mm); void MM_Report(mminfo_t *mm, mminfotype *mmi); -int MM_EMSVer(void); +//int MM_EMSVer(void); void MM_BombOnError(boolean bomb, mminfo_t *mm); void MM_GetNewBlock(mminfo_t *mm); void MM_FreeBlock(mmblocktype *x, mminfo_t *mm);