#endif\r
\r
//from: https://stackoverflow.com/questions/14386856/c-check-available-ram\r
-void __near* HC_LargestFreeBlock(size_t __far* Size)\r
+void __near* HC_LargestFreeBlock(size_t* Size)\r
{\r
size_t s0, s1;\r
void __near* p;\r
}\r
\r
//far version of above\r
-void __far* HC_LargestFarFreeBlock(dword __far* Size)\r
+void __far* HC_LargestFarFreeBlock(dword* Size)\r
{\r
dword s0, s1;\r
void __far* p;\r
}\r
*/\r
\r
-void HCL_HeapWalking (struct _heapinfo __far*h_info, hc_use_t __far*hu, unsigned nearfarswitch)\r
+void HCL_HeapWalking (struct _heapinfo *h_info, hc_use_t *hu, unsigned nearfarswitch)\r
{\r
hu->h_free=0; hu->h_total=0; hu->h_used=0;\r
\r
h_info->_pentry = NULL;\r
for(;;) {\r
- if(nearfarswitch==0) hu->heap_status = _nheapwalk( (struct _heapinfo *)h_info );\r
- else if(nearfarswitch==1) hu->heap_status = _fheapwalk( (struct _heapinfo *)h_info );\r
+ if(nearfarswitch==0) hu->heap_status = _nheapwalk( h_info );\r
+ else if(nearfarswitch==1) hu->heap_status = _fheapwalk( h_info );\r
if( hu->heap_status != _HEAPOK ) break;\r
if((h_info->_useflag == _USEDENTRY ? "USED" : "FREE")=="FREE") hu->h_free += h_info->_size;\r
if((h_info->_useflag == _USEDENTRY ? "USED" : "FREE")=="USED") hu->h_used += h_info->_size;\r
nh_info._pentry = NULL;\r
nh_free=0; nh_total=0; nh_used=0;\r
for(;;) {\r
- heap_status = _nheapwalk( (struct _heapinfo *)&nh_info );\r
+ heap_status = _nheapwalk( &nh_info );\r
if( heap_status != _HEAPOK ) break;\r
strcpy(scratch," "); strcat(scratch,(nh_info._useflag == _USEDENTRY ? "USED" : "FREE")); strcat(scratch," block at ");\r
sprintf(str, "%Fp", nh_info._pentry); //ultoa((dword)nh_info._pentry,str,16);\r
fh_info._pentry = NULL;\r
fh_free=0; fh_total=0; fh_used=0;\r
for(;;) {\r
- heap_status = _fheapwalk( (struct _heapinfo *)&fh_info );\r
+ heap_status = _fheapwalk( &fh_info );\r
if( heap_status != _HEAPOK ) break;\r
strcpy(scratch," "); strcat(scratch,(fh_info._useflag == _USEDENTRY ? "USED" : "FREE")); strcat(scratch," block at ");\r
sprintf(str, "%Fp", fh_info._pentry); //ultoa((dword)fh_info._pentry,str,16);\r
printmeminfoline(scratch, "Near", nh_total, nh_used, nh_free);\r
printmeminfoline(scratch, "Far", fh_total, fh_used, fh_free);\r
strcat(scratch,"---------------- -------- -------- --------\n");\r
+#if defined(__LARGE__) || defined(__COMPACT__) || defined(__HUGE__)\r
strcat(scratch,"HC_coreleft = "); ultoa((dword)HC_coreleft(),str,10); strcat(scratch,str); strcat(scratch,"\n");\r
strcat(scratch,"HC_farcoreleft = "); ultoa((dword)HC_farcoreleft(),str,10); strcat(scratch,str); strcat(scratch,"\n");\r
+#endif\r
//-- strcat(scratch,"HC_Newfarcoreleft = "); ultoa((dword)HC_Newfarcoreleft(),str,10); strcat(scratch,str); strcat(scratch,"\n");\r
//-- strcat(scratch,"HC_GetFreeSize = "); ultoa((dword)HC_GetFreeSize(),str,10); strcat(scratch,str); strcat(scratch,"\n");\r
//00 strcat(scratch,"HC_GetNearFreeSize = "); ultoa((dword)HC_GetNearFreeSize(),str,10); strcat(scratch,str); strcat(scratch,"\n");\r