+*/\r
+\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( 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
+ hu->h_total += h_info->_size;\r
+ }\r
+ HCL_heapstat(hu->heap_status);\r
+}\r