ZealOS/docs/System/Utils/MemRep.CC.html
TomAwezome 1b75d91002 Fix Mount AHCI Port selection.
Add arg to SATARep to specify drive types to show.
Add checks in AHCIPortInit to verify port signatures, add helper method to get signatures from port.
2021-08-02 16:40:05 -04:00

288 lines
30 KiB
HTML
Executable file

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
<meta name="generator" content="ZealOS V0.13">
<style type="text/css">
body {background-color:#fef1f0;}
.cF0{color:#000000;background-color:#fef1f0;}
.cF1{color:#0148a4;background-color:#fef1f0;}
.cF2{color:#3b7901;background-color:#fef1f0;}
.cF3{color:#057c7e;background-color:#fef1f0;}
.cF4{color:#bb2020;background-color:#fef1f0;}
.cF5{color:#9e42ae;background-color:#fef1f0;}
.cF6{color:#b57901;background-color:#fef1f0;}
.cF7{color:#b2b6af;background-color:#fef1f0;}
.cF8{color:#555753;background-color:#fef1f0;}
.cF9{color:#678fbb;background-color:#fef1f0;}
.cFA{color:#82bc49;background-color:#fef1f0;}
.cFB{color:#0097a2;background-color:#fef1f0;}
.cFC{color:#e26a6a;background-color:#fef1f0;}
.cFD{color:#c671bc;background-color:#fef1f0;}
.cFE{color:#c7ab00;background-color:#fef1f0;}
.cFF{color:#fef1f0;background-color:#fef1f0;}
</style>
</head>
<body>
<pre style="font-family:monospace;font-size:12pt">
<a name="l1"></a><span class=cF0>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>&quot;Info;Memory/Info;Cmd Line (Typically)&quot;</span><span class=cF0>
<a name="l2"></a>
<a name="l3"></a></span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>TSSSize</span><span class=cF0>(</span><span class=cF9>CTSS</span><span class=cF0> *tss)
<a name="l4"></a>{
<a name="l5"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF5>MSize2</span><span class=cF0>(tss) + </span><span class=cF5>MSize2</span><span class=cF0>(tss-&gt;st0) + </span><span class=cF5>MSize2</span><span class=cF0>(tss-&gt;st1) + </span><span class=cF5>MSize2</span><span class=cF0>(tss-&gt;st2);
<a name="l6"></a>}
<a name="l7"></a>
<a name="l8"></a></span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>PenBrushesSize</span><span class=cF0>()
<a name="l9"></a>{
<a name="l10"></a> </span><span class=cF9>I64</span><span class=cF0> res = </span><span class=cFE>0</span><span class=cF0>, i;
<a name="l11"></a>
<a name="l12"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i &lt; </span><span class=cF3>GR_PEN_BRUSHES_NUM</span><span class=cF0>; i++)
<a name="l13"></a> res += </span><span class=cF5>DCSize</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.pen_brushes[i]) + </span><span class=cF5>DCSize</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.collision_pen_brushes[i]) +
<a name="l14"></a> </span><span class=cF5>DCSize</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.even_pen_brushes[i]) + </span><span class=cF5>DCSize</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.odd_pen_brushes[i]);
<a name="l15"></a>
<a name="l16"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l17"></a>}
<a name="l18"></a>
<a name="l19"></a></span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>ScreenZoomTablesSize</span><span class=cF0>()
<a name="l20"></a>{
<a name="l21"></a> </span><span class=cF9>I64</span><span class=cF0> res = </span><span class=cFE>0</span><span class=cF0>, i;
<a name="l22"></a>
<a name="l23"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>1</span><span class=cF0>; i &lt;= </span><span class=cF3>GR_SCREEN_ZOOM_MAX</span><span class=cF0>;i++)
<a name="l24"></a> res += </span><span class=cF5>MSize2</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.screen_zoom_tables[i]);
<a name="l25"></a>
<a name="l26"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l27"></a>}
<a name="l28"></a>
<a name="l29"></a></span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>TaskStackSize</span><span class=cF0>(</span><span class=cF9>CTask</span><span class=cF0> *task)
<a name="l30"></a>{
<a name="l31"></a> </span><span class=cF9>CTaskStack</span><span class=cF0> *tmps = task-&gt;stack;
<a name="l32"></a> </span><span class=cF9>I64</span><span class=cF0> res = </span><span class=cFE>0</span><span class=cF0>;
<a name="l33"></a>
<a name="l34"></a> </span><span class=cF1>while</span><span class=cF0> (tmps)
<a name="l35"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l36"></a> res += </span><span class=cF5>MSize2</span><span class=cF0>(tmps);
<a name="l37"></a> tmps = tmps-&gt;next_stack;
<a name="l38"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l39"></a>
<a name="l40"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l41"></a>}
<a name="l42"></a>
<a name="l43"></a></span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>TaskQueueSize</span><span class=cF0>(</span><span class=cF9>CTask</span><span class=cF0> *task)
<a name="l44"></a>{
<a name="l45"></a> </span><span class=cF9>CJob</span><span class=cF0> *tmpc,*tmpc1;
<a name="l46"></a> </span><span class=cF9>I64</span><span class=cF0> res = </span><span class=cFE>0</span><span class=cF0>;
<a name="l47"></a>
<a name="l48"></a> </span><span class=cF1>PUSHFD</span><span class=cF0>
<a name="l49"></a> </span><span class=cF1>CLI</span><span class=cF0>
<a name="l50"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF5>LBts</span><span class=cF7>(</span><span class=cF0>&amp;task-&gt;server_ctrl.flags, </span><span class=cF3>JOBCf_LOCKED</span><span class=cF7>)</span><span class=cF0>)
<a name="l51"></a> </span><span class=cF1>PAUSE</span><span class=cF0>
<a name="l52"></a>
<a name="l53"></a> tmpc1 = &amp;task-&gt;server_ctrl.next_waiting;
<a name="l54"></a> tmpc = tmpc1-&gt;next;
<a name="l55"></a> </span><span class=cF1>while</span><span class=cF0> (tmpc != tmpc1)
<a name="l56"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l57"></a> res += </span><span class=cF5>MSize2</span><span class=cF0>(tmpc) + </span><span class=cF5>MSize2</span><span class=cF0>(tmpc-&gt;aux_str);
<a name="l58"></a> tmpc = tmpc-&gt;next;
<a name="l59"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l60"></a>
<a name="l61"></a> tmpc1 = &amp;task-&gt;server_ctrl.next_done;
<a name="l62"></a> tmpc = tmpc1-&gt;next;
<a name="l63"></a> </span><span class=cF1>while</span><span class=cF0> (tmpc != tmpc1)
<a name="l64"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l65"></a> res += </span><span class=cF5>MSize2</span><span class=cF0>(tmpc) + </span><span class=cF5>MSize2</span><span class=cF0>(tmpc-&gt;aux_str);
<a name="l66"></a> tmpc = tmpc-&gt;next;
<a name="l67"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l68"></a>
<a name="l69"></a> </span><span class=cF5>LBtr</span><span class=cF0>(&amp;task-&gt;server_ctrl.flags, </span><span class=cF3>JOBCf_LOCKED</span><span class=cF0>);
<a name="l70"></a> </span><span class=cF1>POPFD</span><span class=cF0>
<a name="l71"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l72"></a>}
<a name="l73"></a>
<a name="l74"></a></span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>BlkDevsSize</span><span class=cF0>()
<a name="l75"></a>{
<a name="l76"></a> </span><span class=cF9>I64</span><span class=cF0> i, j, res = </span><span class=cF5>MSize2</span><span class=cF0>(</span><span class=cFB>blkdev</span><span class=cF0>.blkdevs);
<a name="l77"></a> </span><span class=cF9>CBlkDev</span><span class=cF0> *bd;
<a name="l78"></a>
<a name="l79"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i &lt; </span><span class=cF3>BLKDEVS_NUM</span><span class=cF0>; i++)
<a name="l80"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l81"></a> bd = &amp;</span><span class=cFB>blkdev</span><span class=cF0>.blkdevs[i];
<a name="l82"></a> </span><span class=cF1>if</span><span class=cF0> (bd-&gt;bd_signature == </span><span class=cF3>BD_SIGNATURE_VAL</span><span class=cF0>)
<a name="l83"></a> {
<a name="l84"></a> j = (bd-&gt;max_blk + </span><span class=cFE>1</span><span class=cF0>) &lt;&lt; </span><span class=cF3>BLK_SIZE_BITS</span><span class=cF0>;
<a name="l85"></a> </span><span class=cF1>if</span><span class=cF0> (bd-&gt;type == </span><span class=cF3>BDT_RAM</span><span class=cF0>)
<a name="l86"></a> </span><span class=cF6>&quot;RAMDisk %C\t:%010X/%010X\n&quot;</span><span class=cF0>, bd-&gt;first_drive_let, j - </span><span class=cF5>DriveUnused</span><span class=cF0>(bd-&gt;first_drive_let), j;
<a name="l87"></a> res += </span><span class=cF5>MSize2</span><span class=cF0>(bd-&gt;dev_id_record);
<a name="l88"></a> }
<a name="l89"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l90"></a>
<a name="l91"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l92"></a>}
<a name="l93"></a>
<a name="l94"></a></span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>DrivesSize</span><span class=cF0>()
<a name="l95"></a>{
<a name="l96"></a> </span><span class=cF9>I64</span><span class=cF0> i, res = </span><span class=cF5>MSize2</span><span class=cF0>(</span><span class=cFB>blkdev</span><span class=cF0>.drvs);
<a name="l97"></a>
<a name="l98"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i &lt; </span><span class=cF3>DRIVES_NUM</span><span class=cF0>; i++)
<a name="l99"></a> res += </span><span class=cF5>MSize2</span><span class=cF0>(</span><span class=cFB>blkdev</span><span class=cF0>.drvs[i].cur_fat_blk) + </span><span class=cF5>MSize2</span><span class=cF0>(</span><span class=cFB>blkdev</span><span class=cF0>.drvs[i].fis);
<a name="l100"></a>
<a name="l101"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l102"></a>}
<a name="l103"></a>
<a name="l104"></a></span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>MemRepTask</span><span class=cF0>(</span><span class=cF9>CTask</span><span class=cF0> *task,</span><span class=cF1>Bool</span><span class=cF0> override_validate=</span><span class=cF3>FALSE</span><span class=cF0>)
<a name="l105"></a>{
<a name="l106"></a> </span><span class=cF9>I64</span><span class=cF0> i, j, k, m, n;
<a name="l107"></a> </span><span class=cF9>CDoc</span><span class=cF0> *pdoc, *ddoc, *bdoc;
<a name="l108"></a> </span><span class=cF9>CCompCtrl</span><span class=cF0> *cc;
<a name="l109"></a> </span><span class=cF9>CMathODE</span><span class=cF0> *o;
<a name="l110"></a> </span><span class=cF9>CCPU</span><span class=cF0> *c;
<a name="l111"></a> </span><span class=cF9>CTask</span><span class=cF0> *task1;
<a name="l112"></a>
<a name="l113"></a> </span><span class=cF1>if</span><span class=cF0> (!override_validate &amp;&amp; !</span><span class=cF5>TaskValidate</span><span class=cF7>(</span><span class=cF0>task</span><span class=cF7>)</span><span class=cF0>)
<a name="l114"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l115"></a> </span><span class=cF1>if</span><span class=cF0> (task == </span><span class=cF5>Fs</span><span class=cF0>)
<a name="l116"></a> task-&gt;rsp = </span><span class=cF5>RSPGet</span><span class=cF0>;
<a name="l117"></a> </span><span class=cF6>&quot;$BLACK$%-27t$Q#%08X$FG$\n&quot;</span><span class=cF0>, task-&gt;task_title,task;
<a name="l118"></a> </span><span class=cF6>&quot;$ID,2$Heap\t:%010X/%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>TaskMemUsed</span><span class=cF0>(task, override_validate), </span><span class=cF5>TaskMemAlloced</span><span class=cF0>(task,override_validate);
<a name="l119"></a>
<a name="l120"></a> i = </span><span class=cF5>UnusedStack</span><span class=cF0>(task);
<a name="l121"></a> j = </span><span class=cF5>TaskStackSize</span><span class=cF0>(task);
<a name="l122"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFE>0</span><span class=cF0> &lt;= i &lt;= task-&gt;stack-&gt;stack_size)
<a name="l123"></a> </span><span class=cF6>&quot;Stack\t\t:%010X/%010X\n&quot;</span><span class=cF0>,j - i, j;
<a name="l124"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l125"></a> </span><span class=cF6>&quot;Stack\t\t:$RED$$BK,1$Overflow$BK,0$$FG$/%010X\n&quot;</span><span class=cF0>, j;
<a name="l126"></a>
<a name="l127"></a> </span><span class=cF6>&quot;HashTable\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>HashTableSize2</span><span class=cF0>(task-&gt;hash_table);
<a name="l128"></a> </span><span class=cF6>&quot;FPU\t\t\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>MSize2</span><span class=cF0>(task-&gt;fpu_mmx);
<a name="l129"></a> </span><span class=cF6>&quot;DirCur\t\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>MSize2</span><span class=cF0>(task-&gt;cur_dir);
<a name="l130"></a>
<a name="l131"></a> </span><span class=cF1>if</span><span class=cF0> (pdoc = </span><span class=cF5>DocPut</span><span class=cF7>(</span><span class=cF0>task</span><span class=cF7>)</span><span class=cF0>)
<a name="l132"></a> </span><span class=cF6>&quot;PutDoc\t\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>DocSize</span><span class=cF0>(pdoc);
<a name="l133"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF7>(</span><span class=cF0>ddoc = </span><span class=cF5>DocDisplay</span><span class=cF0>(task)</span><span class=cF7>)</span><span class=cF0> &amp;&amp; pdoc != ddoc)
<a name="l134"></a> </span><span class=cF6>&quot;DisplayDoc\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>DocSize</span><span class=cF0>(ddoc);
<a name="l135"></a> </span><span class=cF1>if</span><span class=cF0> (bdoc = </span><span class=cF5>DocBorder</span><span class=cF7>(</span><span class=cF0>task</span><span class=cF7>)</span><span class=cF0>)
<a name="l136"></a> </span><span class=cF6>&quot;BorderDoc\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>DocSize</span><span class=cF0>(bdoc);
<a name="l137"></a>
<a name="l138"></a> cc = task-&gt;next_cc;
<a name="l139"></a> </span><span class=cF1>while</span><span class=cF0> (cc != &amp;task-&gt;next_cc)
<a name="l140"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l141"></a> </span><span class=cF6>&quot;CompCtrl\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>CompCtrlSize</span><span class=cF0>(cc);
<a name="l142"></a> cc = cc-&gt;next;
<a name="l143"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l144"></a>
<a name="l145"></a> o = task-&gt;next_ode;
<a name="l146"></a> </span><span class=cF1>while</span><span class=cF0> (o != &amp;task-&gt;next_ode)
<a name="l147"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l148"></a> </span><span class=cF6>&quot;CMathODE\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>ODESize</span><span class=cF0>(o);
<a name="l149"></a> o = o-&gt;next;
<a name="l150"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l151"></a>
<a name="l152"></a> </span><span class=cF1>if</span><span class=cF0> (task == </span><span class=cFB>sys_winmgr_task</span><span class=cF0>)
<a name="l153"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l154"></a> </span><span class=cF6>&quot;gr.pen_brushes\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>PenBrushesSize</span><span class=cF0>;
<a name="l155"></a> </span><span class=cF6>&quot;gr.screen_zoom_tbles\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>ScreenZoomTablesSize</span><span class=cF0>;
<a name="l156"></a> </span><span class=cF6>&quot;screencast.dc\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>DCSize</span><span class=cF0>(</span><span class=cFB>screencast</span><span class=cF0>.dc);
<a name="l157"></a> </span><span class=cF6>&quot;screencast.dc2_alias\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>DCSize</span><span class=cF0>(</span><span class=cFB>screencast</span><span class=cF0>.dc2_alias);
<a name="l158"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l159"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (task == </span><span class=cFB>sys_task</span><span class=cF0>)
<a name="l160"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l161"></a> j = </span><span class=cFE>0</span><span class=cF0>;
<a name="l162"></a> k = </span><span class=cFE>0</span><span class=cF0>;
<a name="l163"></a> m = </span><span class=cFE>0</span><span class=cF0>;
<a name="l164"></a> n = </span><span class=cFE>0</span><span class=cF0>;
<a name="l165"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i &lt; </span><span class=cFB>mp_count</span><span class=cF0>; i++)
<a name="l166"></a> {
<a name="l167"></a> c = &amp;</span><span class=cFB>cpu_structs</span><span class=cF0>[i];
<a name="l168"></a> k += </span><span class=cF5>TSSSize</span><span class=cF0>(c-&gt;tss);
<a name="l169"></a> task1 = c-&gt;executive_task;
<a name="l170"></a> </span><span class=cF1>do</span><span class=cF0>
<a name="l171"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l172"></a> </span><span class=cF1>if</span><span class=cF0> (task1 != </span><span class=cFB>sys_task</span><span class=cF0>) {</span><span class=cF2>//system task located in Kernel mem</span><span class=cF0>
<a name="l173"></a> j += </span><span class=cF5>MSize2</span><span class=cF0>(task1);
<a name="l174"></a> m += </span><span class=cF5>MSize2</span><span class=cF0>(task1-&gt;code_heap);
<a name="l175"></a> </span><span class=cF1>if</span><span class=cF0> (task1-&gt;data_heap != task1-&gt;code_heap)
<a name="l176"></a> m += </span><span class=cF5>MSize2</span><span class=cF0>(task1-&gt;code_heap);
<a name="l177"></a> }
<a name="l178"></a> n += </span><span class=cF5>TaskQueueSize</span><span class=cF0>(task1);
<a name="l179"></a> task1 = task1-&gt;next_task;
<a name="l180"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l181"></a> </span><span class=cF1>while</span><span class=cF0> (task1 != c-&gt;executive_task);
<a name="l182"></a>
<a name="l183"></a> task1 = c-&gt;idle_task;
<a name="l184"></a> j += </span><span class=cF5>MSize2</span><span class=cF0>(task1);
<a name="l185"></a> m += </span><span class=cF5>MSize2</span><span class=cF0>(task1-&gt;code_heap);
<a name="l186"></a> </span><span class=cF1>if</span><span class=cF0> (task1-&gt;data_heap != task1-&gt;code_heap)
<a name="l187"></a> m += </span><span class=cF5>MSize2</span><span class=cF0>(task1-&gt;code_heap);
<a name="l188"></a> }
<a name="l189"></a> </span><span class=cF6>&quot;TaskStructs\t:%010X\n&quot;</span><span class=cF0>, j;
<a name="l190"></a> </span><span class=cF6>&quot;TSSes\t\t:%010X\n&quot;</span><span class=cF0>, k;
<a name="l191"></a> </span><span class=cF6>&quot;HeapCtrls\t:%010X\n&quot;</span><span class=cF0>, m;
<a name="l192"></a> </span><span class=cF1>if</span><span class=cF0> (n)
<a name="l193"></a> </span><span class=cF6>&quot;TaskQueues\t:%010X\n&quot;</span><span class=cF0>, n;
<a name="l194"></a> </span><span class=cF6>&quot;BlkDevs\t\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>BlkDevsSize</span><span class=cF0>;
<a name="l195"></a> </span><span class=cF6>&quot;Drives\t\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>DrivesSize</span><span class=cF0>;
<a name="l196"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>blkdev</span><span class=cF0>.cache_base)
<a name="l197"></a> </span><span class=cF6>&quot;DiskCache\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>MSize2</span><span class=cF0>(</span><span class=cFB>blkdev</span><span class=cF0>.cache_base)+</span><span class=cF5>MSize2</span><span class=cF0>(</span><span class=cFB>blkdev</span><span class=cF0>.cache_hash_table)+ </span><span class=cF5>MSize2</span><span class=cF0>(</span><span class=cFB>blkdev</span><span class=cF0>.cache_ctrl);
<a name="l198"></a> </span><span class=cF6>&quot;Clip\t\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>DocSize</span><span class=cF0>(</span><span class=cFB>sys_clip_doc</span><span class=cF0>);
<a name="l199"></a> </span><span class=cF6>&quot;AutoComplete:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>CallExtStr</span><span class=cF0>(</span><span class=cF6>&quot;AutoCompleteSize&quot;</span><span class=cF0>);
<a name="l200"></a> </span><span class=cF6>&quot;text.font\t\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>MSize2</span><span class=cF0>(</span><span class=cFB>text</span><span class=cF0>.font);
<a name="l201"></a> </span><span class=cF6>&quot;text.raw_screen\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>MSize2</span><span class=cF0>(</span><span class=cFB>text</span><span class=cF0>.raw_screen);
<a name="l202"></a> </span><span class=cF6>&quot;gr.to_8_bits\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>MSize2</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.to_8_bits);
<a name="l203"></a> </span><span class=cF6>&quot;gr.to_8_colors\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>MSize2</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.to_8_colors);
<a name="l204"></a> </span><span class=cF6>&quot;gr.text_base\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>MSize2</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.text_base);
<a name="l205"></a> </span><span class=cF6>&quot;gr.screen_cache\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>MSize2</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.screen_cache);
<a name="l206"></a> </span><span class=cF6>&quot;gr.win_z_buf\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>MSize2</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.win_z_buf)+ </span><span class=cF5>MSize2</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.win_uncovered_bitmap);
<a name="l207"></a> </span><span class=cF6>&quot;gr.dc\t\t\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>DCSize</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.dc);
<a name="l208"></a> </span><span class=cF6>&quot;gr.dc1\t\t\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>DCSize</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.dc1);
<a name="l209"></a> </span><span class=cF6>&quot;gr.dc2\t\t\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>DCSize</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.dc2);
<a name="l210"></a> </span><span class=cF6>&quot;gr.dc_cache\t\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>DCSize</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.dc_cache);
<a name="l211"></a> </span><span class=cF6>&quot;gr.screen_image\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>DCSize</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.screen_image);
<a name="l212"></a> </span><span class=cF6>&quot;gr.zoomed_dc\t:%010X\n&quot;</span><span class=cF0>, </span><span class=cF5>DCSize</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.zoomed_dc);
<a name="l213"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l214"></a> </span><span class=cF6>&quot;$ID,-2$&quot;</span><span class=cF0>;
<a name="l215"></a>
<a name="l216"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l217"></a>}
<a name="l218"></a>
<a name="l219"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>MemRep</span><span class=cF0>()
<a name="l220"></a>{</span><span class=cF2>//Memory usage report.</span><span class=cF0>
<a name="l221"></a> </span><span class=cF9>I64</span><span class=cF0> i;
<a name="l222"></a> </span><span class=cF9>CTask</span><span class=cF0> *task;
<a name="l223"></a> </span><span class=cF9>CCPU</span><span class=cF0> *c;
<a name="l224"></a> </span><span class=cF9>CBinFile</span><span class=cF0> *bfh = </span><span class=cFB>mem_boot_base</span><span class=cF0> - </span><span class=cF1>sizeof</span><span class=cF0>(</span><span class=cF9>CBinFile</span><span class=cF0>);
<a name="l225"></a>
<a name="l226"></a> bfh(</span><span class=cF9>I64</span><span class=cF0>) += bfh-&gt;file_size - </span><span class=cFE>1</span><span class=cF0>;
<a name="l227"></a>
<a name="l228"></a> </span><span class=cF6>&quot;$BLACK$Low Memory\t:00100000$FG$\n$ID,2$&quot;</span><span class=cF0>;
<a name="l229"></a> </span><span class=cF6>&quot;Kernel\t:%08X-%08X\n&quot;</span><span class=cF0>, </span><span class=cFB>mem_boot_base</span><span class=cF0> - </span><span class=cF1>sizeof</span><span class=cF0>(</span><span class=cF9>CBinFile</span><span class=cF0>), bfh;
<a name="l230"></a>
<a name="l231"></a> </span><span class=cF6>&quot;$ID,-2$$BLACK$High Memory\t:00100000-%08X$FG$\n&quot;</span><span class=cF0>, </span><span class=cFB>mem_heap_limit</span><span class=cF0>;
<a name="l232"></a> </span><span class=cF6>&quot;</span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l4125"><span class=cF4>SYS_FIXED_AREA</span></a><span class=cF6>\t:%08X-%08X\n&quot;</span><span class=cF0>, </span><span class=cF3>SYS_FIXED_AREA</span><span class=cF0>, </span><span class=cF3>SYS_FIXED_AREA</span><span class=cF0> + </span><span class=cF1>sizeof</span><span class=cF0>(</span><span class=cF9>CSysFixedArea</span><span class=cF0>) - </span><span class=cFE>1</span><span class=cF0>;
<a name="l233"></a>
<a name="l234"></a> </span><span class=cF6>&quot;</span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l532"><span class=cF4>VBE framebuffer</span></a><span class=cF6>\t:%08X-%08X\n&quot;</span><span class=cF0>, </span><span class=cFB>text</span><span class=cF0>.fb_alias, </span><span class=cFB>text</span><span class=cF0>.fb_alias(</span><span class=cF1>U8</span><span class=cF0> *) + </span><span class=cFB>text</span><span class=cF0>.buffer_size - </span><span class=cFE>1</span><span class=cF0>;
<a name="l235"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>sys_data_bp</span><span class=cF0>)
<a name="l236"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l237"></a> </span><span class=cF6>&quot;$BLACK$Code Heap\t:%010X/%010X$FG$\n&quot;</span><span class=cF0>, </span><span class=cFB>sys_code_bp</span><span class=cF0>-&gt;used_u8s, </span><span class=cFB>sys_code_bp</span><span class=cF0>-&gt;alloced_u8s;
<a name="l238"></a> </span><span class=cF6>&quot;$BLACK$Data Heap\t:%010X/%010X$FG$\n&quot;</span><span class=cF0>, </span><span class=cFB>sys_data_bp</span><span class=cF0>-&gt;used_u8s, </span><span class=cFB>sys_data_bp</span><span class=cF0>-&gt;alloced_u8s;
<a name="l239"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l240"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l241"></a> </span><span class=cF6>&quot;$BLACK$Code/Data Heap\t:%08X/%08X$FG$\n&quot;</span><span class=cF0>, </span><span class=cFB>sys_code_bp</span><span class=cF0>-&gt;used_u8s, </span><span class=cFB>sys_code_bp</span><span class=cF0>-&gt;alloced_u8s;
<a name="l242"></a>
<a name="l243"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i &lt; </span><span class=cFB>mp_count</span><span class=cF0>; i++)
<a name="l244"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l245"></a> c = &amp;</span><span class=cFB>cpu_structs</span><span class=cF0>[i];
<a name="l246"></a> </span><span class=cF6>&quot;$PURPLE$CPU%d$FG$\n$ID,2$&quot;</span><span class=cF0>, i;
<a name="l247"></a> task = c-&gt;executive_task;
<a name="l248"></a> </span><span class=cF1>do</span><span class=cF0>
<a name="l249"></a> {
<a name="l250"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>MemRepTask</span><span class=cF7>(</span><span class=cF0>task</span><span class=cF7>)</span><span class=cF0>)
<a name="l251"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l252"></a> task = task-&gt;next_task;
<a name="l253"></a> }
<a name="l254"></a> </span><span class=cF1>while</span><span class=cF0> (task != c-&gt;executive_task);
<a name="l255"></a>
<a name="l256"></a> </span><span class=cF5>MemRepTask</span><span class=cF0>(c-&gt;idle_task, </span><span class=cF3>TRUE</span><span class=cF0>);
<a name="l257"></a> </span><span class=cF6>&quot;$ID,-2$&quot;</span><span class=cF0>;
<a name="l258"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l259"></a>}
</span></pre></body>
</html>