From: sparky4 Date: Fri, 31 Jul 2015 22:02:20 +0000 (-0500) Subject: those programs are messy! wwww X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=b0f1ab75ade3fb50a4d07a330ad43471dcbfc265;p=16.git those programs are messy! wwww modified: 16.exe new file: DEBUG.16 new file: MMDUMP.16 new file: PROFILE.16 modified: exmmtest.exe modified: inputest.exe modified: scroll.exe modified: sountest.exe modified: src/lib/16_head.c modified: src/lib/16_mm.c modified: src/lib/16_mm.h --- diff --git a/16.exe b/16.exe index a2867bbb..85e6fc4a 100644 Binary files a/16.exe and b/16.exe differ diff --git a/DEBUG.16 b/DEBUG.16 new file mode 100644 index 00000000..8ad8653b --- /dev/null +++ b/DEBUG.16 @@ -0,0 +1,6 @@ +Seg:0 Size:5212 Owner:0x76ff +Seg:145c Size:256 Owner:0x6552 +Seg:155c Size:273 Owner:0x92aa +Seg:1af9 Size:17 Owner:0x6532 +Seg:1cfa Size:49926 Owner:0x0 +Seg:e000 Size:4294909951 Owner:0x5bba diff --git a/MMDUMP.16 b/MMDUMP.16 new file mode 100644 index 00000000..5715b37a Binary files /dev/null and b/MMDUMP.16 differ diff --git a/PROFILE.16 b/PROFILE.16 new file mode 100644 index 00000000..e69de29b diff --git a/exmmtest.exe b/exmmtest.exe index 15e09da6..9147e645 100644 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/inputest.exe b/inputest.exe index f899a674..c8083960 100644 Binary files a/inputest.exe and b/inputest.exe differ diff --git a/scroll.exe b/scroll.exe index b3d74af3..9d132349 100644 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/sountest.exe b/sountest.exe index dcd680a9..db2fbe05 100644 Binary files a/sountest.exe and b/sountest.exe differ diff --git a/src/lib/16_head.c b/src/lib/16_head.c index a7be849f..95a9e688 100644 --- a/src/lib/16_head.c +++ b/src/lib/16_head.c @@ -477,6 +477,9 @@ print_normal_entry(kittengets(2,1,"Far"), (dword)fh_total, (dword)fh_used, (dwor printf( "---------------- -------- -------- --------\n"); printf("coreleft = %lu\n", (dword)_coreleft()); printf("farcoreleft = %lu\n", (dword)_farcoreleft()); +printf("GetFreeSize = %lu\n", (dword)GetFreeSize()); +printf("GetNearFreeSize = %lu\n", (dword)GetNearFreeSize()); +printf("GetFarFreeSize = %lu\n", (dword)GetFarFreeSize()); printf("memavl = %lu\n", (dword)_memavl()); printf("stackavail = %u\n", stackavail()); } diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index 52b44bbb..701db3e8 100644 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -674,7 +674,7 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi) //---- length=coreleft(); printf(" nearheap making!\n"); _nheapgrow(); - length=(dword)_coreleft();//(dword)_memmax();//(dword)GetFreeSize(); + length=(dword)_memavl();//(dword)GetFreeSize(); start = (void huge *)(mm->nearheap = _nmalloc(length)); length -= 16-(FP_OFF(start)&15); length -= SAVENEARHEAP; @@ -692,7 +692,7 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi) //---- length=farcoreleft(); printf(" farheap making!\n"); _fheapgrow(); - length=(dword)_farcoreleft();//(dword)GetFarFreeSize();//0xffffUL*4UL; + length=(dword)GetFarFreeSize();//0xffffUL*4UL; //start = mm->farheap = halloc(length, 1); start = mm->farheap = _fmalloc(length); length -= 16-(FP_OFF(start)&15); diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index a17482fc..3b98e0ae 100644 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -30,7 +30,7 @@ //++++mh #include "src/lib/16_in.h" #ifdef __DEBUG__ // 1 == Debug/Dev ; 0 == Production/final -#define OUT_OF_MEM_MSG "MM_GetPtr: Out of memory!\nYou were short :%lu bytes" +#define OUT_OF_MEM_MSG "MM_GetPtr: Out of memory!\nYou were short :%lu bytes\n" #else #define OUT_OF_MEM_MSG "\npee\n" #endif