]> 4ch.mooo.com Git - 16.git/commitdiff
ok!
authorsparky4 <sparky4@cock.li>
Mon, 6 Jul 2015 17:17:36 +0000 (12:17 -0500)
committersparky4 <sparky4@cock.li>
Mon, 6 Jul 2015 17:17:36 +0000 (12:17 -0500)
modified:   exmmtest.exe
modified:   src/lib/16_mm.c
modified:   src/lib/16_mm.h

exmmtest.exe
src/lib/16_mm.c
src/lib/16_mm.h

index ac2747e9e2ffa5f8062ff53bfafa62d23f663ba0..70d36418892f869e3b6182dc6baa8bb6068d0d46 100644 (file)
Binary files a/exmmtest.exe and b/exmmtest.exe differ
index 7ef1d7e03a0202a852273998a7cd50df1b5484b8..f6477b4d7c6ec54d5805d2f0be42cbe42f71c805 100644 (file)
@@ -425,11 +425,12 @@ void MML_UseSpace(/*d*/word segstart, dword seglength, mminfo_t *mm)
        mmblocktype huge *scan,huge *last;
        dword   oldend;
        ///*d*/word fat=0;
-       word segm=0;
        dword           extra;
 
        scan = last = mm->mmhead;
        mm->mmrover = mm->mmhead;               // reset rover to start of memory
+       scan->segm=1;
+       scan->segmlen=seglength;
 
 //
 // search for the block that contains the range of segments
@@ -440,9 +441,10 @@ void MML_UseSpace(/*d*/word segstart, dword seglength, mminfo_t *mm)
                scan = scan->next;
        }
 
+       //find out how many blocks it span!
        if(seglength>0xfffflu)
        {
-               segm=seglength/0xfffflu;
+               scan->segm=seglength/0xfffflu;
        }
 
 //
@@ -460,8 +462,8 @@ void MML_UseSpace(/*d*/word segstart, dword seglength, mminfo_t *mm)
                        inc             ax
                        mov     ds,ax
                }*/
+printf("segm=%u        ", scan->segm);
 printf("ex=%lu ", extra);
-printf("segm=%u        ", segm);
 printf("len=%u ", scan->length);
 printf("segsta=%u      ", segstart);
 printf("seglen=%lu\n", seglength);
index 1ef85c953182f2a16e0bb27e149c5e4a9418383c..0b2bc4519e349bca278181284894f95fa2b1f126 100644 (file)
@@ -118,6 +118,8 @@ typedef struct mmblockstruct
        //dword start,length;
        //word  start;
        //dword length;
+       word segm;                              //how many 64kb segment blocks it takes up if there is many data!
+       dword segmlen;          //length of the multi segment data
        unsigned        attributes;
        memptr          *useptr;        // pointer to the segment start
        struct mmblockstruct huge *next;