--- /dev/null
+\r
+ == default ==\r
+\r
+ USED block at 1d140016 of size 136\r
+ USED block at 1d14009e of size 66\r
+ FREE block at 1d1400e0 of size 18\r
+ USED block at 1d1400f2 of size 20\r
+ FREE block at 1d140106 of size 7926\r
+OK - end of heap\r
+\r
+ == near ==\r
+\r
+ USED block at 0 of size 0\r
+ USED block at 0 of size 0\r
+ USED block at 0 of size 0\r
+ USED block at 0 of size 0\r
+ USED block at 0 of size 0\r
+ USED block at 0 of size 0\r
+ USED block at 0 of size 0\r
+ USED block at 0 of size 0\r
+ USED block at 0 of size 0\r
+OK - end of heap\r
+\r
+ == far ==\r
+\r
+ USED block at 0 of size 0\r
+ USED block at 0 of size 0\r
+ USED block at 0 of size 0\r
+ USED block at 0 of size 0\r
+ USED block at 0 of size 0\r
+OK - end of heap\r
+\r
+Memory Type Total Used Free\r
+---------------- -------- -------- --------\r
+Default 8166 222 7944\r
+Near 31318 834 30484\r
+Far 8166 222 7944\r
+---------------- -------- -------- --------\r
+coreleft = 30482\r
+farcoreleft = 38230\r
+GetFreeSize = 7768\r
+GetNearFreeSize = 30484\r
+GetFarFreeSize = 7768\r
+memavl = 30482\r
+stackavail = 11023\r
{
pop ds
}*/
- //printf("MML_UseSpace: Segment spans two blocks!\n");
+ printf("MML_UseSpace: Segment spans two blocks!\n");
}
//
//
emsskip:
mmi->XMSmem = 0;
+ goto xmsskip;
for(i = 1;i <
#ifdef __WATCOMC__
__argc
mmblocktype huge *scan;
//byte color;
word temp;
- long end,owner;
- word chx,chy;
+ sdword end,owner;
+ //word chx,chy;
+ word w;
byte scratch[160],scratch0[4096],str[16];
- byte d = "#";
+ byte d = '#';
//**** VW_SetDefaultColors();
//**** VW_SetLineWidth(40);
//++++mh temp = bufferofs;
//++++mh bufferofs = 0;
//**** VW_SetScreen (0,0);
-
scan = mm->mmhead;
end = -1;
-CA_OpenDebug (gvar);
- chx=0;
-//++++ chy=0;
+ CA_OpenDebug (gvar);
+ w=0;
while(scan)
{
+ strcpy(scratch, AARESET);
if(scan->attributes & PURGEBITS)
strcpy(scratch0, AAMAGENTA); // dark purple = purgable
else
strcpy(scratch0, AARED); // red = locked
if(scan->start<=end)
{
- write(gvar->handle.debughandle,"\nMM_ShowMemory: Memory block order currupted!\n",strlen("\nMM_ShowMemory: Memory block order currupted!\n"));
+ printf("\n%d\n\n", end);
+ strcat(scratch, "MM_ShowMemory: Memory block order currupted!\n");
+ strcat(scratch, "End's Size: ");
+ ultoa (end,str,10);
+ strcat (scratch,str);
+ strcat(scratch, "\nscan->start's Size: ");
+ ultoa (scan->start,str,10);
+ strcat (scratch,str);
+ write(gvar->handle.debughandle,scratch,strlen(scratch));
//modexprint(&page, chx, chy, 1, 0, 24, "\nMM_ShowMemory: Memory block order currupted!\n");
break;
}
- end = scan->start+scan->length-1;
+ end = scan->start+(word)scan->length-1;
//++++ chy = scan->start/320;
//++++ chx = scan->start%320;
//modexhlin(page, scan->start, (unsigned)end, chy, color);
//++++ modexClearRegion(page, chx, chy, 4, 4, color);
//}
//++++ VW_Hlin(scan->start,(unsigned)end,0,color);
- for(chx=scan->start;chx>=(word)end;chx++)
- {
- strcat(scratch0,&d);
- }
- strcat (scratch0,AAWHITE); strcat(scratch0,&d);
+// for(w=0;w>=(word)scan->length/80;w++)
+// {
+// printf("+ %lu\n", w);
+ //ultoa (w,str,10);
+ //strcat (scratch0,str);
+ strcat(scratch0, "+");
+// }
+ strcat(scratch0, AARESET); strcat(scratch0, AAGREY); strcat(scratch0,"_");
//++++ VW_Plot(scan->start,0,15);
//++++ modexClearRegion(page, chx, chy, 4, 4, 15);
//++++ VW_Hlin(end+1,scan->next->start,0,0); // black = free
- if(scan->next->start > end+1)
- {
- strcat(scratch0,AABLACK);
- for(chx=end+1;chx>=(word)scan->next->start;chx++)
- {
- strcat(scratch0,&d);
- }
- }
+ if(scan->next->start > end+1)
+ {
+ strcat(scratch0, AARESET);
+ //ultoa (w,str,10);
+ //strcat (scratch0,str);
+ strcat(scratch0,AAGREEN);
+// for(w=(scan->next->start)/80;w>=(word)((scan->length+1)/80);w++)
+// {
+// printf("0 %lu\n", w);
+ strcat(scratch0,"0");
+// }
+ }
+ strcat(scratch0, AARESET);
+ strcat(scratch0,"\n");
//for(chx=scan->next->start;chx+4>=(word)end+1;chx+=4)
//{
// chx+=scan->next->start;
/* y = scan->start/320;
x = scan->start%320;
VW_Hlin(x,x+end,y,color);
- VW_Plot(x,y,15);
- if (scan->next && scan->next->start > end+1)
- {
- //write(gvar->handle.showmemhandle,AABLACK,strlen(AABLACK));
- //for(chx=scan->start;chx>=(word)end;chx++)
- //{
- //write(gvar->handle.showmemhandle,"_",1);
- //}
- //write(gvar->handle.showmemhandle,"\n",strlen("\n"));
- strcat(scratch0,AABLACK); strcat(scratch0,0x10);
- }*/
+ VW_Plot(x,y,15);*/
//++++ VW_Hlin(x+end+1,x+(scan->next->start-scan->start),y,0); // black = free
-write(gvar->handle.showmemhandle,scratch0,strlen(scratch0));
-strcpy(scratch,"Seg:");
-ultoa (scan->start,str,16);
-strcat (scratch,str);
-strcat (scratch,"\tSize:");
-ultoa ((dword)scan->length,str,10);
-strcat (scratch,str);
-strcat (scratch,"\tOwner:0x");
-owner = (unsigned)scan->useptr;
-ultoa (owner,str,16);
-strcat (scratch,str);
-strcat (scratch,"\n");
-write(gvar->handle.debughandle,scratch,strlen(scratch));
+ strcat(scratch,"Seg:");
+ ultoa (scan->start,str,16);
+ strcat (scratch,str);
+ strcat (scratch,"\tSize:");
+ ultoa ((dword)scan->length,str,10);
+ strcat (scratch,str);
+ strcat (scratch,"\tOwner:0x");
+ owner = (unsigned)scan->useptr;
+ ultoa (owner,str,16);
+ strcat (scratch,str);
+ strcat (scratch,"\n");
+ write(gvar->handle.debughandle,scratch,strlen(scratch));
+ write(gvar->handle.debughandle,scratch0,strlen(scratch0));
//modexprint(page, chx, chy, 1, 0, 24, &scratch);
//++++chy+=4;
//fprintf(stdout, "%s", scratch);
scan = scan->next;
}
-CA_CloseDebug (gvar);
+ CA_CloseDebug (gvar);
//++++mh IN_Ack();
//**** VW_SetLineWidth(64);