From: sparky4 Date: Thu, 6 Aug 2015 00:25:35 +0000 (-0500) Subject: okies ^^ X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=633bfa5a2a8416f6550866feb3bc1e027f3b19cf;p=16.git okies ^^ modified: DEBUG.16 modified: HEAP.16 modified: MMDUMP.16 modified: exmmtest.exe modified: src/exmmtest.c modified: src/lib/16_mm.c modified: src/lib/16_mm.h --- diff --git a/DEBUG.16 b/DEBUG.16 index 05af38d2..7eaa3cc3 100644 --- a/DEBUG.16 +++ b/DEBUG.16 @@ -1,8 +1,18 @@ -0 Size:5492 Owner:0x7400 -0 Size:5492 Owner:0x7400 -1574 Size:256 Owner:0x4cde -Seg:1674 Size:273 Owner:0x857a -Seg:1cc4 Size:49 Owner:0x62b9 -Seg:1cc4 Size:49 Owner:0x62b9 -acf5 Size:13067 Owner:0xbf80 -Seg:e000 Size:4294909951 Owner:0x11c +0 Size:5546 Owner:0x0 +0 Size:5546 Owner:0x0 +15aa Size:256 Owner:0x351e +Seg:16aa Size:273 Owner:0x857a +Seg:1cf8 Size:49 Owner:0x0 +Seg:ad29 Size:8920 Owner:0x0 +Seg:d022 Size:4294967263 Owner:0x0 +Seg:d022 Size:4294967263 Owner:0x0 +Seg:d022 Size:4294967263 Owner:0x0 +Seg:d022 Size:4294967263 Owner:0x0 +Seg:d022 Size:4294967263 Owner:0x0 +Seg:d022 Size:4294967263 Owner:0x0 +Seg:d022 Size:4294967263 Owner:0x0 +Seg:d022 Size:4294967263 Owner:0x0 +Seg:d022 Size:4294967263 Owner:0x0 +Seg:d022 Size:4294967263 Owner:0x0 +Seg:d022 Size:419 Owner:0x0 +Seg:e000 Size:4294909951 Owner:0x0 diff --git a/HEAP.16 b/HEAP.16 index c9f32b98..7a50a81f 100644 --- a/HEAP.16 +++ b/HEAP.16 @@ -1,11 +1,11 @@ == default == - USED block at 1ce60016 of size 136 - USED block at 1ce6009e of size 66 - FREE block at 1ce600e0 of size 18 - USED block at 1ce600f2 of size 20 - FREE block at 1ce60106 of size 7926 + USED block at 1d1a0016 of size 136 + USED block at 1d1a009e of size 66 + FREE block at 1d1a00e0 of size 18 + USED block at 1d1a00f2 of size 20 + FREE block at 1d1a0106 of size 7926 OK - end of heap == near == @@ -33,13 +33,13 @@ OK - end of heap Memory Type Total Used Free ---------------- -------- -------- -------- Default 8166 222 7944 -Near 31318 834 30484 +Near 31318 862 30456 Far 8166 222 7944 ---------------- -------- -------- -------- -coreleft = 30482 -farcoreleft = 38230 +coreleft = 30454 +farcoreleft = 38202 GetFreeSize = 7768 -GetNearFreeSize = 30484 +GetNearFreeSize = 30456 GetFarFreeSize = 7768 -memavl = 30482 -stackavail = 17129 +memavl = 30454 +stackavail = 11049 diff --git a/MMDUMP.16 b/MMDUMP.16 index 5ad0a04f..58c6845a 100644 Binary files a/MMDUMP.16 and b/MMDUMP.16 differ diff --git a/exmmtest.exe b/exmmtest.exe index 9499bf14..72f080b3 100644 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/src/exmmtest.c b/src/exmmtest.c index 0c65a477..82cc6d37 100644 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -142,16 +142,16 @@ main(int argc, char *argv[]) if(baka) printf("\nyay!\n"); else printf("\npoo!\n"); #endif - printf("bigbuffer= %Fp\n", bigbuffer); - printf("&bigbuffer= %Fp\n", &bigbuffer); - printf("bigbuffer= %04x\n", bigbuffer); - printf("&bigbuffer= %04x\n", &bigbuffer); + //printf("bigbuffer= %Fp\n", bigbuffer); + //printf("&bigbuffer= %Fp\n", &bigbuffer); + //printf("bigbuffer= %04x\n", bigbuffer); + //printf("&bigbuffer= %04x\n", &bigbuffer); //printf("\n\n"); //printf("Total free: %lu\n", (dword)(GetFreeSize())); //printf("Total near free: %lu\n", (dword)(GetNearFreeSize())); //printf("Total far free: %lu\n", (dword)(GetFarFreeSize())); //getch(); - printf("\n"); +// printf("\n"); #ifdef __WATCOMC__ heapdump(); #endif diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index fda606f2..ba29d60c 100644 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -478,7 +478,7 @@ boolean MML_CheckForXMS(mminfo_t *mm) void MML_SetupXMS(mminfo_t *mm, mminfotype *mmi) { - unsigned base,size; + word base,size; getmemory: __asm { @@ -517,7 +517,7 @@ getmemory: #ifdef __WATCOMC__ } #endif - printf("base=%u ", base); printf("size=%u\n", size); +// printf("base=%u ", base); printf("size=%u\n", size); MML_UseSpace(base,size, mm); mmi->XMSmem += size*16; mm->UMBbase[mm->numUMBs] = base; @@ -833,9 +833,6 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi) //MM_MapXEMS(mm, mmi); // map in used pages } -mmi->XMSmem=0; -goto xmsskip; - // // detect XMS and get upper memory blocks // @@ -894,15 +891,15 @@ void MM_Shutdown(mminfo_t *mm) if(!(mm->mmstarted)) return; - _ffree(mm->farheap); printf(" far freed\n"); + _ffree(mm->farheap);// printf(" far freed\n"); #ifdef __WATCOMC__ - _nfree(mm->nearheap); printf(" near freed\n"); + _nfree(mm->nearheap);// printf(" near freed\n"); #endif #ifdef __BORLANDC__ - free(mm->nearheap); printf(" near freed\n"); + free(mm->nearheap);// printf(" near freed\n"); #endif - if(MML_CheckForEMS()){ MML_ShutdownEMS(mm); printf(" EMS freed\n"); } - if(MML_CheckForXMS(mm)){ 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"); } } //========================================================================== @@ -1461,8 +1458,8 @@ dword MM_UnusedMemory(mminfo_t *mm) scan = scan->next; } -// return free*16l; - return free; + return free*16lu; +// return free; } //========================================================================== @@ -1494,8 +1491,8 @@ dword MM_TotalFree(mminfo_t *mm) scan = scan->next; } -// return free*16l; - return free; + return free*16lu; +// return free; } //========================================================================== diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index 9a01862a..49a943fc 100644 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -46,7 +46,7 @@ #define BUFFERSIZE 0x1000 // miscelanious, allways available buffer -#define MAXBLOCKS 720 +#define MAXBLOCKS 1024