From: sparky4 Date: Thu, 2 Jul 2015 03:02:28 +0000 (-0500) Subject: wwww ok! X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=1e6ea7c0ae09578fb11557868bd0551e4f19a12c;p=16.git wwww ok! modified: exmmtest.exe modified: palettec.exe modified: src/exmmtest.c modified: src/lib/16_mm.c --- diff --git a/exmmtest.exe b/exmmtest.exe index 6139d98c..51657d3c 100644 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/palettec.exe b/palettec.exe index 1df956b8..ae8c257a 100644 Binary files a/palettec.exe and b/palettec.exe differ diff --git a/src/exmmtest.c b/src/exmmtest.c index 5e737db4..7c234960 100644 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -35,7 +35,7 @@ main(int argc, char *argv[]) printf("done!\n"); printf("&main()=%Fp\n", *argv[0]); MM_ShowMemory(&mm); -//++++ MM_Report(&mm, &mmi); + MM_Report(&mm, &mmi); printf("stop!\n"); MM_Shutdown(&mm); printf("done!\n"); diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index 9762a86d..e738cad5 100644 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -599,7 +599,7 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi) if(US_CheckParm(__argv[i],ParmStringsexmm) == 0) goto emsskip; // param NOEMS } - + 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! if(MML_CheckForEMS()) { //printf("EMS1\n"); @@ -622,7 +622,7 @@ emsskip: if( US_CheckParm(__argv[i],ParmStringsexmm) == 0) goto xmsskip; // param NOXMS } - + 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! if(MML_CheckForXMS(mm)) { //printf("XMS!\n"); @@ -661,10 +661,8 @@ void MM_Shutdown(mminfo_t *mm) printf("near freed\n"); //hfree(mm->hugeheap); //printf("huge freed\n"); - MML_ShutdownEMS(mm); - printf("EMS freed\n"); - MML_ShutdownXMS(mm); - printf("XMS freed\n"); + if(MML_CheckForEMS()){ MML_ShutdownEMS(mm); printf("EMS freed\n"); } + if(MML_CheckForXMS(mm)){ MML_ShutdownXMS(mm); printf("XMS freed\n"); } } //========================================================================== @@ -1147,10 +1145,13 @@ dword MM_TotalFree(mminfo_t *mm) void MM_Report(mminfo_t *mm, mminfotype *mmi) { - printf("EMM %x available\n", mm->EMSVer); - printf("totalEMSpages=%u\n", mm->totalEMSpages); - printf("freeEMSpages=%u\n", mm->freeEMSpages); - printf("EMSpageframe=%Fp\n", mm->EMSpageframe); + if(MML_CheckForEMS()) + { + printf("EMM %x available\n", mm->EMSVer); + printf("totalEMSpages=%u\n", mm->totalEMSpages); + printf("freeEMSpages=%u\n", mm->freeEMSpages); + printf("EMSpageframe=%Fp\n", mm->EMSpageframe); + } printf("near=%lu\n", mmi->nearheap); printf("far=%lu\n", mmi->farheap); printf("EMSmem=%lu\n", mmi->EMSmem);