]> 4ch.mooo.com Git - 16.git/commitdiff
remove endid
authorsparky4 <sparky4@cock.li>
Mon, 10 Aug 2015 13:32:56 +0000 (08:32 -0500)
committersparky4 <sparky4@cock.li>
Mon, 10 Aug 2015 13:32:56 +0000 (08:32 -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 5dc4fb36de7e80948872902b8e2e282863ac3140..ff8006ed6bd9308adfb6ef3203ff801a1cff1f6d 100644 (file)
Binary files a/exmmtest.exe and b/exmmtest.exe differ
index 7f5eae6fd115c8af7f84d39ad8c55d897420faab..3cb6cb757f51667ccca532964c5b84c91a51f39b 100644 (file)
@@ -641,6 +641,8 @@ void MML_UseSpace(word segstart, dword seglength, mminfo_t *mm)
        if(extra > 0)
        {
                GETNEWBLOCK;
+               mm->mmnew->useptr = NULL;
+
                mm->mmnew->next = scan->next;
                scan->next = mm->mmnew;
                mm->mmnew->start = segstart+seglength;
@@ -708,7 +710,6 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
 
        mm->mmstarted = true;
        mm->bombonerror = true;
-       mm->endid=0;
 
 //
 // set up the linked list (everything in the free list;
@@ -997,7 +998,6 @@ printf("boop\n");//0000
 #endif
                printf(OUT_OF_MEM_MSG,(size-mmi->nearheap));
                printf("for stability reasons the program will shut down! wwww\n");
-               printf("                endid=%u\n",(mm->endid));
                MM_Shutdown(mm);
                exit(-1);
        }
@@ -1693,7 +1693,6 @@ void MM_BombOnError(boolean bomb, mminfo_t *mm)
                return;
        }
        mm->mmfree=mm->mmfree->next;
-       mm->endid++;    //end of list
 }
 
 void MM_FreeBlock(mmblocktype *x, mminfo_t *mm)
@@ -1701,7 +1700,6 @@ void MM_FreeBlock(mmblocktype *x, mminfo_t *mm)
        x->useptr=NULL;
        x->next=mm->mmfree;
        mm->mmfree=x;
-       mm->endid--;    //end of list
 }*/
 
 /*void MM_seguin(void)
index 4bb9f69367258f3b6cc931c809858d968c9c7994..a27fb541406b353432b638e1f0cf7f449605a34b 100644 (file)
@@ -35,9 +35,9 @@
 #endif
 
 //#define GETNEWBLOCK {if(!(mmnew=mmfree))Quit("MM_GETNEWBLOCK: No free blocks!") ;mmfree=mmfree->next;}
-#define GETNEWBLOCK {if(!mm->mmfree)MML_ClearBlock(mm);mm->mmnew=mm->mmfree;mm->mmfree=mm->mmfree->next;mm->endid++;}
+#define GETNEWBLOCK {if(!mm->mmfree)MML_ClearBlock(mm);mm->mmnew=mm->mmfree;mm->mmfree=mm->mmfree->next;}
 
-#define FREEBLOCK(x) {*x->useptr=NULL;x->next=mm->mmfree;mm->mmfree=x;mm->endid--;}
+#define FREEBLOCK(x) {*x->useptr=NULL;x->next=mm->mmfree;mm->mmfree=x;}
 
 #define AARED          "\x1b[41;31m"
 #define AABLUE         "\x1b[44;34m"
@@ -153,7 +153,6 @@ typedef struct
        unsigned        totalEMSpages,freeEMSpages,EMSpageframe,EMSpagesmapped,EMShandle;
        unsigned int EMSVer;
        word numUMBs,UMBbase[MAXUMBS];
-       word    endid;  //end of list
        //dword numUMBs,UMBbase[MAXUMBS];
        mmblocktype     huge mmblocks[MAXBLOCKS],huge *mmhead,huge *mmfree,huge *mmrover,huge *mmnew;
 } mminfo_t;