]> 4ch.mooo.com Git - 16.git/commitdiff
fack!
authorsparky4 <sparky4@cock.li>
Wed, 22 Jul 2015 18:47:16 +0000 (13:47 -0500)
committersparky4 <sparky4@cock.li>
Wed, 22 Jul 2015 18:47:16 +0000 (13:47 -0500)
modified:   16.hed
modified:   DEBUG.16
modified:   MMDUMP.16
modified:   exmmtest.exe
modified:   src/lib/16_mm.c
modified:   src/lib/16_mm.h

16.hed
DEBUG.16
MMDUMP.16
exmmtest.exe
src/lib/16_mm.c
src/lib/16_mm.h

diff --git a/16.hed b/16.hed
index 2b186fbec73e4724bd08b3eef8d29a4a260e9a20..5d24fc799adf30fdf729c555e7d05e48aa7be90e 100644 (file)
Binary files a/16.hed and b/16.hed differ
index 1f794e8f98f851a21d1b672eec60c20f98fc3454..2690aa29e60db99f2b268538cab72c91772df316 100644 (file)
--- a/DEBUG.16
+++ b/DEBUG.16
@@ -1,6 +1,16 @@
-Seg:0  Size:109104     Owner:0xfdba\r
-Seg:1b9c       Size:16 Owner:0xc31e\r
-Seg:1b9d       Size:4096       Owner:0xc25c\r
-Seg:1f42       Size:789472     Owner:0xa8c\r
-\r
-MM_ShowMemory: Memory block order currupted!\r
+Seg:0  Size:6828       Owner:0x1674\r
+Seg:1ba5       Size:1  Owner:0x46c7\r
+Seg:1ba6       Size:256        Owner:0xc25c\r
+Seg:1f4b       Size:45238      Owner:0x90c3\r
+Seg:d022       Size:4294967263 Owner:0x91e8\r
+Seg:d022       Size:4294967263 Owner:0x8b04\r
+Seg:d022       Size:4294967263 Owner:0x26b8\r
+Seg:d022       Size:4294967263 Owner:0xf04e\r
+Seg:d022       Size:4294967263 Owner:0x7f94\r
+Seg:d022       Size:4294967263 Owner:0xc01b\r
+Seg:d022       Size:4294967263 Owner:0x1a2\r
+Seg:d022       Size:4294967263 Owner:0x9005\r
+Seg:d022       Size:4294967263 Owner:0x3350\r
+Seg:d022       Size:4294967263 Owner:0x2b8\r
+Seg:d022       Size:419        Owner:0x2eb8\r
+Seg:e000       Size:4294909951 Owner:0xc02b\r
index 02fa2ec3f6f939d8bc599669107203b7e3050d97..b1fad0add169935df44d88822154a8a2f38c93c0 100644 (file)
Binary files a/MMDUMP.16 and b/MMDUMP.16 differ
index 5b068f6ffa0d60491d3b948f1081a754662620e5..0f8110cdf2d437fc868c26f8d13212b0d02ff03d 100644 (file)
Binary files a/exmmtest.exe and b/exmmtest.exe differ
index 138a31b41580a4077f96c1e87789152036a26198..3ba93d329444678c6a9beda1e6bf6ebc7983c0f6 100644 (file)
@@ -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);
index 7de1ef2170160734fcb574e7cc8a614298b63544..ccf1a59b50495d07131a82260079e90a10ea506a 100644 (file)
 
 //==========================================================================
 //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
 {