]> 4ch.mooo.com Git - 16.git/commitdiff
wwww
authorsparky4 <sparky4@cock.li>
Fri, 31 Jul 2015 19:49:02 +0000 (14:49 -0500)
committersparky4 <sparky4@cock.li>
Fri, 31 Jul 2015 19:49:02 +0000 (14:49 -0500)
modified:   16.exe
modified:   DEBUG.16
modified:   MMDUMP.16
modified:   exmmtest.exe
modified:   inputest.exe
modified:   scroll.exe
modified:   sountest.exe
modified:   src/exmmtest.c
modified:   src/lib/16_head.c
modified:   src/lib/16_mm.c
modified:   src/lib/16_mm.h

16.exe
DEBUG.16
MMDUMP.16
exmmtest.exe
inputest.exe
scroll.exe
sountest.exe
src/exmmtest.c
src/lib/16_head.c
src/lib/16_mm.c
src/lib/16_mm.h

diff --git a/16.exe b/16.exe
index f6e032726cb9bd59e222dfbf5c552aa826d9a657..a2867bbbb527cab3ea0e6db208922870c475e1eb 100644 (file)
Binary files a/16.exe and b/16.exe differ
index c78ea75cc308625a257e0b8e5f80939270f3513b..782a334ab8c119b3580c29e6d5192b18f84f435e 100644 (file)
--- a/DEBUG.16
+++ b/DEBUG.16
@@ -1,17 +1,6 @@
-Seg:0  Size:6918       Owner:0x80\r
-Seg:1b06       Size:256        Owner:0x64b0\r
-Seg:218d       Size:33 Owner:0x80\r
-Seg:235f       Size:44194      Owner:0x80\r
-Seg:d021       Size:4294967264 Owner:0x76ff\r
-Seg:d021       Size:4294967264 Owner:0x70bc\r
-Seg:d021       Size:4294967264 Owner:0x8b55\r
-Seg:d021       Size:4294967264 Owner:0xc483\r
-Seg:d021       Size:4294967264 Owner:0x4c4\r
-Seg:d021       Size:4294967264 Owner:0x90cb\r
-Seg:d021       Size:4294967264 Owner:0xfa7e\r
-Seg:d021       Size:4294967264 Owner:0x104\r
-Seg:d021       Size:4294967264 Owner:0xfa4e\r
-Seg:d021       Size:4294967264 Owner:0x215e\r
-Seg:d021       Size:525        Owner:0x0\r
-Seg:d22e       Size:1959       Owner:0x920a\r
-Seg:e000       Size:4294909951 Owner:0x80\r
+Seg:0  Size:5202       Owner:0xfa\r
+Seg:1452       Size:256        Owner:0x64d2\r
+Seg:1552       Size:48 Owner:0x922a\r
+Seg:1af4       Size:18 Owner:0x2bfe\r
+Seg:1eea       Size:49430      Owner:0xff01\r
+Seg:e000       Size:4294909951 Owner:0x64d2\r
index 386a89addf52895d3c753673743574eb63181c20..93afd41d1ee4ad99591e16f0148fb4eb04f70b0f 100644 (file)
Binary files a/MMDUMP.16 and b/MMDUMP.16 differ
index 365cc3192f945a6bedbad7c2b64d9b229ce53c67..6ae752a6ded60e1fcc361af81fea15777e4390cb 100644 (file)
Binary files a/exmmtest.exe and b/exmmtest.exe differ
index 7a67da064cc494245118ba3d526bd34814395e63..f899a6748002b9c2c02b103d6b376977fd56f55e 100644 (file)
Binary files a/inputest.exe and b/inputest.exe differ
index 7de0e452a3bdf713e7adfb807e8431aff5fc442c..b3d74af3edbce97928d0a61db045dde657ee1080 100644 (file)
Binary files a/scroll.exe and b/scroll.exe differ
index ce98077bd8c6d819c557da621435ee297d3943d2..dcd680a907af688e5a112cc57207a9bf46cb42a5 100644 (file)
Binary files a/sountest.exe and b/sountest.exe differ
index fc1a901b54b61c270e6a37c82c622fd7db5380c5..22397daabc9e2cde3537dd532d21703d274afa3f 100644 (file)
@@ -93,6 +93,7 @@ main(int argc, char *argv[])
        printf("&bigbuffer=     %Fp\n", &bigbuffer);
        printf("bigbuffer=      %04x\n", bigbuffer);
        printf("&bigbuffer=     %04x\n", &bigbuffer);
+       getch();
 #ifdef FILERL
 //     bakapeehandle = open(bakapee,O_RDONLY | O_BINARY, S_IREAD);
 //     printf("size of big buffer~=%u\n", _bmsize(segu, bigbuffer));
@@ -109,12 +110,12 @@ main(int argc, char *argv[])
                baka=0;
 //     close(bakapeehandle);
        //hmm functions in cache system use the buffered stuff
-//     printf("size of big buffer~=%u\n", _bmsize(segu, bigbuffer));
+       printf("size of big buffer~=%u\n", _bmsize(sega, bigbuffer));
 #endif
        printf("dark purple = purgable\n");
        printf("medium blue = non purgable\n");
        printf("red = locked\n");
-//     getch();
+       getch();
        //++++modexEnter();
        //++++modexShowPage(&screen);
        MM_ShowMemory(/*&screen, */&mm);
@@ -135,7 +136,6 @@ main(int argc, char *argv[])
        if(baka) printf("\nyay!\n");
        else printf("\npoo!\n");
 #endif
-       //printf("_bios_memsize=%u\n", _bios_memsize());
        printf("bigbuffer=      %Fp\n", bigbuffer);
        printf("&bigbuffer=     %Fp\n", &bigbuffer);
        printf("bigbuffer=      %04x\n", bigbuffer);
index 8e70082e840d5f4f28dc5afa611537f78c379522..a7be849fbf429d56cd59595b6b0f7f83a7e7cfda 100644 (file)
@@ -475,7 +475,9 @@ print_normal_entry(kittengets(2,1,"Default"), (dword)h_total, (dword)h_used, (dw
 print_normal_entry(kittengets(2,1,"Near"), (dword)nh_total, (dword)nh_used, (dword)nh_free);
 print_normal_entry(kittengets(2,1,"Far"), (dword)fh_total, (dword)fh_used, (dword)fh_free);
 printf(      "----------------  --------   --------   --------\n");
-//printf("memavl = %lu\n", (dword)_memavl());
+printf("coreleft = %lu\n", (dword)_coreleft());
+printf("farcoreleft = %lu\n", (dword)_farcoreleft());
+printf("memavl = %lu\n", (dword)_memavl());
 printf("stackavail = %u\n", stackavail());
 }
 
index 38754e10cbbae0f570cec38df1908ae75bc09c69..3aecccb56acde39e7bc0c96b699f2444cd5aa07a 100644 (file)
@@ -673,9 +673,9 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
 //
 //---- length=coreleft();
        printf("                nearheap making!\n");
-       _heapgrow();
-       length=_memmax();//(dword)GetFreeSize();
-       start = (void huge *)(mm->nearheap = malloc(length));
+       _nheapgrow();
+       length=(dword)_coreleft();//(dword)_memmax();//(dword)GetFreeSize();
+       start = (void huge *)(mm->nearheap = _nmalloc(length));
        length -= 16-(FP_OFF(start)&15);
        length -= SAVENEARHEAP;
        seglength = length / 16;                        // now in paragraphs
@@ -683,7 +683,8 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
        MML_UseSpace(segstart,seglength, mm);
        mmi->nearheap = length;
        printf("start=%FP       segstart=%X     seglen=%lu      len=%lu\n", start, segstart, seglength, length);
-       printf("                near heap ok!\n");
+       //heapdump();
+       //getch();
 
 //
 // get all available far conventional memory segments
@@ -691,7 +692,7 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
 //---- length=farcoreleft();
        printf("                farheap making!\n");
        _fheapgrow();
-       length=(dword)GetFarFreeSize();//0xffffUL*4UL;
+       length=(dword)_farcoreleft();//(dword)GetFarFreeSize();//0xffffUL*4UL;
        //start = mm->farheap = halloc(length, 1);
        start = mm->farheap = _fmalloc(length);
        length -= 16-(FP_OFF(start)&15);
@@ -701,7 +702,7 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
        MML_UseSpace(segstart,seglength, mm);
        mmi->farheap = length;
        printf("start=%FP       segstart=%X     seglen=%lu      len=%lu\n", start, segstart, seglength, length);
-       printf("                far heap ok!\n");
+       heapdump();
 
        mmi->mainmem = mmi->nearheap + mmi->farheap;
 
@@ -751,7 +752,7 @@ 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
        }
 
 //
@@ -781,7 +782,7 @@ void MM_Shutdown(mminfo_t *mm)
                return;
 
        _ffree(mm->farheap);    printf("                far freed\n");
-       free(mm->nearheap);     printf("                near freed\n");
+       _nfree(mm->nearheap);   printf("                near freed\n");
        if(MML_CheckForEMS()){ MML_ShutdownEMS(mm); printf("            EMS freed\n"); }
        if(MML_CheckForXMS(mm)){ MML_ShutdownXMS(mm); printf("          XMS freed\n"); }
 }
@@ -883,7 +884,7 @@ void MM_GetPtr(memptr *baseptr,dword size, mminfo_t *mm, mminfotype *mmi)
        if (mm->bombonerror)
        {
                printf(OUT_OF_MEM_MSG,(size-mmi->nearheap));
-               exit(-5);
+               exit(-1);
        }
        else
                mm->mmerror = true;
index 083a4d299c9edac773a18e1e40688c40b9e62d32..a17482fc374f3cacc27f29e2e5c3ce9c87ba2831 100644 (file)
@@ -36,8 +36,8 @@
 #endif
 
 
-#define SAVENEARHEAP   0x200           // space to leave in data segment
-#define SAVEFARHEAP    0x400                   // space to leave in far heap
+#define SAVENEARHEAP   0//x200         // space to leave in data segment
+#define SAVEFARHEAP    0//x400                 // space to leave in far heap
 
 #define        BUFFERSIZE              0x1000          // miscelanious, allways available buffer
 
@@ -130,7 +130,7 @@ typedef struct
        memptr bufferseg;
        boolean         mmstarted, bombonerror, mmerror;
        void huge       *farheap;
-       void    *nearheap;
+       void __near     *nearheap;
        //byte          EMS_status;
        unsigned        totalEMSpages,freeEMSpages,EMSpageframe,EMSpagesmapped,EMShandle;
        unsigned int EMSVer;