From: sparky4 Date: Wed, 22 Jul 2015 18:47:16 +0000 (-0500) Subject: fack! X-Git-Url: http://4ch.mooo.com/gitweb/?p=16.git;a=commitdiff_plain;h=86aabd6c02b5aff9c821f146efc79913ebbf432f fack! modified: 16.hed modified: DEBUG.16 modified: MMDUMP.16 modified: exmmtest.exe modified: src/lib/16_mm.c modified: src/lib/16_mm.h --- diff --git a/16.hed b/16.hed index 2b186fbe..5d24fc79 100644 Binary files a/16.hed and b/16.hed differ diff --git a/DEBUG.16 b/DEBUG.16 index 1f794e8f..2690aa29 100644 --- a/DEBUG.16 +++ b/DEBUG.16 @@ -1,6 +1,16 @@ -Seg:0 Size:109104 Owner:0xfdba -Seg:1b9c Size:16 Owner:0xc31e -Seg:1b9d Size:4096 Owner:0xc25c -Seg:1f42 Size:789472 Owner:0xa8c - -MM_ShowMemory: Memory block order currupted! +Seg:0 Size:6828 Owner:0x1674 +Seg:1ba5 Size:1 Owner:0x46c7 +Seg:1ba6 Size:256 Owner:0xc25c +Seg:1f4b Size:45238 Owner:0x90c3 +Seg:d022 Size:4294967263 Owner:0x91e8 +Seg:d022 Size:4294967263 Owner:0x8b04 +Seg:d022 Size:4294967263 Owner:0x26b8 +Seg:d022 Size:4294967263 Owner:0xf04e +Seg:d022 Size:4294967263 Owner:0x7f94 +Seg:d022 Size:4294967263 Owner:0xc01b +Seg:d022 Size:4294967263 Owner:0x1a2 +Seg:d022 Size:4294967263 Owner:0x9005 +Seg:d022 Size:4294967263 Owner:0x3350 +Seg:d022 Size:4294967263 Owner:0x2b8 +Seg:d022 Size:419 Owner:0x2eb8 +Seg:e000 Size:4294909951 Owner:0xc02b diff --git a/MMDUMP.16 b/MMDUMP.16 index 02fa2ec3..b1fad0ad 100644 Binary files a/MMDUMP.16 and b/MMDUMP.16 differ diff --git a/exmmtest.exe b/exmmtest.exe index 5b068f6f..0f8110cd 100644 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index 138a31b4..3ba93d32 100644 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -739,7 +739,7 @@ printf(" EMS4\n"); // // detect XMS and get upper memory blocks // -emsskip:/* +emsskip: mmi->XMSmem = 0; for(i = 1;i < __argc;i++) { @@ -751,17 +751,13 @@ printf("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 { printf("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); //bug! printf(" XMS!\n"); - //++++ MML_SetupXMS(mm, mmi); // allocate as many UMBs as possible + MML_SetupXMS(mm, mmi); // allocate as many UMBs as possible } // // allocate the misc buffer // -xmsskip:*/ -/*mmi->nearheap = 0; -mmi->farheap = 0; -mmi->EMSmem = 0;*/ -mmi->XMSmem = 0; +xmsskip: mm->mmrover = mm->mmhead; // start looking for space after low block MM_GetPtr(&(mm->bufferseg),BUFFERSIZE, mm, mmi); @@ -1208,7 +1204,7 @@ strcpy(scratch,"Seg:"); ultoa (scan->start,str,16); strcat (scratch,str); strcat (scratch,"\tSize:"); -ltoa ((dword)scan->length*16,str,10); +ultoa ((dword)scan->length,str,10); strcat (scratch,str); strcat (scratch,"\tOwner:0x"); owner = (unsigned)scan->useptr; @@ -1381,7 +1377,7 @@ void MM_Report(/*page_t *page, */mminfo_t *mm, mminfotype *mmi) printf("freeEMSpages=%u\n", mm->freeEMSpages); printf("EMSpageframe=%x\n", mm->EMSpageframe); } - if(MML_CheckForXMS(mm)) printf("XMSaddr=%Fp\n", *XMSaddr); + if(MML_CheckForXMS(mm)) printf("XMSaddr=%X\n", *XMSaddr); printf("near=%lu\n", mmi->nearheap); printf("far=%lu\n", mmi->farheap); printf("EMSmem=%lu\n", mmi->EMSmem); @@ -1389,6 +1385,8 @@ void MM_Report(/*page_t *page, */mminfo_t *mm, mminfotype *mmi) printf("mainmem=%lu\n", mmi->mainmem); printf("UnusedMemory=%lu\n", MM_UnusedMemory(mm)); printf("TotalFree=%lu\n", MM_TotalFree(mm)); + //mmi->nearheap+mmi->farheap+ + printf("TotalUsed=%lu\n", mmi->mainmem+mmi->EMSmem+mmi->XMSmem);//+); // printf("\n"); // printf("UnusedMemory=%lu kb\n", MM_UnusedMemory()/10248); // printf("TotalFree=%lu kb\n", MM_TotalFree()/10248); diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index 7de1ef21..ccf1a59b 100644 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -85,8 +85,10 @@ //========================================================================== //I hope this is correct! -//__segment seg; -typedef void __based(__self) * memptr; //__based(seg) * memptr; +typedef void __based(void)* memptr; +//__segment sega; +//__self +//typedef void __based( sega ) * memptr; typedef struct { @@ -116,7 +118,7 @@ extern void (* XMSaddr) (void); // far pointer to XMS driver #define BASEATTRIBUTES 0 // unlocked, non purgable #define MAXUMBS 12 -#define MAPPAGES mm->EMSpagesmapped +#define MAPPAGES 4//mm->EMSpagesmapped typedef struct mmblockstruct {