TempleOSCD_150720.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:46:22 +02:00
1 parent 401601816c
commit f8c05f98f4
554 files changed
+26046 -24853

No files matched your search

+13 -10
View File
@@ -25,6 +25,7 @@ public I64 TaskMemUsed(CTask *task=NULL,Bool override_validate=FALSE)
return 0;
}
#help_index "Memory/Task;Debugging/Heap"
public Bool HeapRep(CTask *task)
{//Report status of task's heap.
I64 i,cnt;
@@ -86,7 +87,7 @@ public Bool HeapRep(CTask *task)
#help_index "Memory/HeapCtrl;Debugging/Heap"
public Bool IsInHeapCtrl(U8 *a,CHeapCtrl *hc,Bool lock=TRUE)
{//Check addr if on heap.
{//Check addr if in HeapCtrl.
CMemBlk *m;
PUSHFD
CLI
@@ -134,7 +135,7 @@ public Bool HeapCtrlWalk(CHeapCtrl *hc)
uum=uum->next;
}
#if _CFG_HEAP_DBG
#if _CFG_HEAP_DBG
CMemUsed *um,*um1;
um1=(&hc->next_um)(U8 *)-offset(CMemUsed.next);
um=um1->next;
@@ -149,7 +150,7 @@ public Bool HeapCtrlWalk(CHeapCtrl *hc)
POPFD
return TRUE;
hc_false:
hc_false:
LBtr(&hc->locked_flags,HClf_LOCKED);
POPFD
return FALSE;
@@ -157,10 +158,11 @@ hc_false:
#help_index "Memory/Task;Debugging/Heap"
public Bool IsInHeap(U8 *a,CTask *task=NULL,Bool lock=TRUE)
{//Check addr if on heap.
{//Check addr if in task's heaps.
if (!task) task=Fs;
if (TaskValidate(task) && (IsInHeapCtrl(a,task->code_heap,lock)||
task->data_heap!=task->code_heap && IsInHeapCtrl(a,task->data_heap,lock)))
task->data_heap!=task->code_heap &&
IsInHeapCtrl(a,task->data_heap,lock)))
return TRUE;
else
return FALSE;
@@ -170,7 +172,7 @@ public Bool HeapWalk(CTask *task=NULL)
{//Check integrity of task's heaps.
if (!task) task=Fs;
if (!TaskValidate(task) || !HeapCtrlWalk(task->code_heap) ||
task->data_heap!=task->code_heap && !HeapCtrlWalk(task->data_heap))
task->data_heap!=task->code_heap && !HeapCtrlWalk(task->data_heap))
return FALSE;
else
return TRUE;
@@ -183,14 +185,15 @@ U0 TaskRepTask(CTask *task,I64 indent)
U8 *st,*desc=MStrUtil(task->task_title,SUF_SAFE_DOLLAR);
st=MStrPrint("$$MA,T=\"%08X\",LM=\"Kill(0x%X);\n\",$$",task,task,task);
"%h*c%s $$TX,\"%Q...\",SCX=16$$ Mem:%08X\n",indent,CH_SPACE,
st,desc,TaskMemAlloced(task);
st,desc,TaskMemAlloced(task);
"%h*cFlags:%04X:%04X Time:%0.2fm\n",indent+2,CH_SPACE,
task->task_flags,task->display_flags,
task->total_time/60.0/cnts.time_stamp_freq_initial;
task->task_flags,task->display_flags,
task->total_time/60.0/cnts.time_stamp_freq_initial;
Free(st);
Free(desc);
task1=task->next_child_task;
while (task1!=(&task->next_child_task)(U8 *)-offset(CTask.next_sibling_task)) {
while (task1!=(&task->next_child_task)(U8 *)
-offset(CTask.next_sibling_task)) {
TaskRepTask(task1,indent+2);
task1=task1->next_sibling_task;
}