about summary refs log tree commit diff stats
path: root/html/037abandon.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-05-29 02:25:10 -0700
committerKartik K. Agaram <vc@akkartik.com>2017-05-29 02:25:10 -0700
commit4945e77a58f3ab10069461e86e5e10c06e91e489 (patch)
tree2d5cb5200b34ec540f9916578e002c0e3cdb07ea /html/037abandon.cc.html
parent284e5576495a946d60603b026bb5e27de356b9fd (diff)
downloadmu-4945e77a58f3ab10069461e86e5e10c06e91e489.tar.gz
3895
Diffstat (limited to 'html/037abandon.cc.html')
-rw-r--r--html/037abandon.cc.html20
1 files changed, 10 insertions, 10 deletions
diff --git a/html/037abandon.cc.html b/html/037abandon.cc.html
index fdcf071d..c2f2803a 100644
--- a/html/037abandon.cc.html
+++ b/html/037abandon.cc.html
@@ -81,7 +81,7 @@ if ('onhashchange' in window) {
 <span id="L16" class="LineNr"> 16 </span><span class="Delimiter">:(before &quot;End Decrement Refcount(old_address, <a href='030container.cc.html#L238'>payload_type</a>, payload_size)&quot;)</span>
 <span id="L17" class="LineNr"> 17 </span><span class="Normal">if</span> <span class="Delimiter">(</span>old_refcount == <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span id="L18" class="LineNr"> 18 </span>  <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">&quot;mem&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;automatically abandoning &quot;</span> &lt;&lt; old_address &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span>
-<span id="L19" class="LineNr"> 19 </span>  <a href='037abandon.cc.html#L28'>abandon</a><span class="Delimiter">(</span>old_address<span class="Delimiter">,</span> <a href='030container.cc.html#L238'>payload_type</a><span class="Delimiter">,</span> <a href='036refcount.cc.html#L91'>payload_size</a><span class="Delimiter">);</span>
+<span id="L19" class="LineNr"> 19 </span>  <a href='037abandon.cc.html#L28'>abandon</a><span class="Delimiter">(</span>old_address<span class="Delimiter">,</span> <a href='030container.cc.html#L238'>payload_type</a><span class="Delimiter">,</span> <a href='036refcount.cc.html#L93'>payload_size</a><span class="Delimiter">);</span>
 <span id="L20" class="LineNr"> 20 </span><span class="Delimiter">}</span>
 <span id="L21" class="LineNr"> 21 </span>
 <span id="L22" class="LineNr"> 22 </span><span class="Comment">//: When abandoning addresses we'll save them to a 'free list', segregated by size.</span>
@@ -90,7 +90,7 @@ if ('onhashchange' in window) {
 <span id="L25" class="LineNr"> 25 </span>map&lt;<span class="Normal">int</span><span class="Delimiter">,</span> <span class="Normal">int</span>&gt; free_list<span class="Delimiter">;</span>
 <span id="L26" class="LineNr"> 26 </span>
 <span id="L27" class="LineNr"> 27 </span><span class="Delimiter">:(code)</span>
-<span id="L28" class="LineNr"> 28 </span><span class="Normal">void</span> <a href='037abandon.cc.html#L28'>abandon</a><span class="Delimiter">(</span><span class="Normal">int</span> <a href='043space.cc.html#L76'>address</a><span class="Delimiter">,</span> <span class="Normal">const</span> type_tree* <a href='030container.cc.html#L238'>payload_type</a><span class="Delimiter">,</span> <span class="Normal">int</span> <a href='036refcount.cc.html#L91'>payload_size</a><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+<span id="L28" class="LineNr"> 28 </span><span class="Normal">void</span> <a href='037abandon.cc.html#L28'>abandon</a><span class="Delimiter">(</span><span class="Normal">int</span> <a href='043space.cc.html#L76'>address</a><span class="Delimiter">,</span> <span class="Normal">const</span> type_tree* <a href='030container.cc.html#L238'>payload_type</a><span class="Delimiter">,</span> <span class="Normal">int</span> <a href='036refcount.cc.html#L93'>payload_size</a><span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span id="L29" class="LineNr"> 29 </span>  <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">&quot;abandon&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;updating refcounts inside &quot;</span> &lt;&lt; <a href='043space.cc.html#L76'>address</a> &lt;&lt; <span class="Constant">&quot;: &quot;</span> &lt;&lt; <a href='028call_return.cc.html#L158'>to_string</a><span class="Delimiter">(</span><a href='030container.cc.html#L238'>payload_type</a><span class="Delimiter">)</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span>
 <span id="L30" class="LineNr"> 30 </span><span class="CommentedCode">//?   Total_free += size;</span>
 <span id="L31" class="LineNr"> 31 </span><span class="CommentedCode">//?   ++Num_free;</span>
@@ -98,28 +98,28 @@ if ('onhashchange' in window) {
 <span id="L33" class="LineNr"> 33 </span>  <span class="Comment">// decrement any contained refcounts</span>
 <span id="L34" class="LineNr"> 34 </span>  <span class="Normal">if</span> <span class="Delimiter">(</span>is_mu_array<span class="Delimiter">(</span><a href='030container.cc.html#L238'>payload_type</a><span class="Delimiter">))</span> <span class="Delimiter">{</span>
 <span id="L35" class="LineNr"> 35 </span>  <span class="Conceal">¦</span> reagent<span class="Comment">/*</span><span class="Comment">local</span><span class="Comment">*/</span> element<span class="Delimiter">;</span>
-<span id="L36" class="LineNr"> 36 </span>  <span class="Conceal">¦</span> element<span class="Delimiter">.</span>type = <a href='032array.cc.html#L377'>copy_array_element</a><span class="Delimiter">(</span><a href='030container.cc.html#L238'>payload_type</a><span class="Delimiter">);</span>
-<span id="L37" class="LineNr"> 37 </span>  <span class="Conceal">¦</span> <span class="Normal">int</span> <a href='032array.cc.html#L397'>array_length</a> = <a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> address+<span class="Comment">/*</span><span class="Comment">skip refcount</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">);</span>
+<span id="L36" class="LineNr"> 36 </span>  <span class="Conceal">¦</span> element<span class="Delimiter">.</span>type = <a href='032array.cc.html#L378'>copy_array_element</a><span class="Delimiter">(</span><a href='030container.cc.html#L238'>payload_type</a><span class="Delimiter">);</span>
+<span id="L37" class="LineNr"> 37 </span>  <span class="Conceal">¦</span> <span class="Normal">int</span> <a href='032array.cc.html#L398'>array_length</a> = <a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> address+<span class="Comment">/*</span><span class="Comment">skip refcount</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">);</span>
 <span id="L38" class="LineNr"> 38 </span>  <span class="Conceal">¦</span> assert<span class="Delimiter">(</span>element<span class="Delimiter">.</span>type<span class="Delimiter">-&gt;</span>name != <span class="Constant">&quot;array&quot;</span><span class="Delimiter">);</span>
 <span id="L39" class="LineNr"> 39 </span>  <span class="Conceal">¦</span> <span class="Normal">int</span> element_size = size_of<span class="Delimiter">(</span>element<span class="Delimiter">);</span>
-<span id="L40" class="LineNr"> 40 </span>  <span class="Conceal">¦</span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span>  i &lt; <a href='032array.cc.html#L397'>array_length</a><span class="Delimiter">;</span>  ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+<span id="L40" class="LineNr"> 40 </span>  <span class="Conceal">¦</span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span>  i &lt; <a href='032array.cc.html#L398'>array_length</a><span class="Delimiter">;</span>  ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span id="L41" class="LineNr"> 41 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> element<span class="Delimiter">.</span><a href='010vm.cc.html#L65'>set_value</a><span class="Delimiter">(</span><a href='043space.cc.html#L76'>address</a> + <span class="Comment">/*</span><span class="Comment">skip refcount and length</span><span class="Comment">*/</span><span class="Constant">2</span> + i*element_size<span class="Delimiter">);</span>
-<span id="L42" class="LineNr"> 42 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='036refcount.cc.html#L61'>decrement_any_refcounts</a><span class="Delimiter">(</span>element<span class="Delimiter">);</span>
+<span id="L42" class="LineNr"> 42 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='036refcount.cc.html#L62'>decrement_any_refcounts</a><span class="Delimiter">(</span>element<span class="Delimiter">);</span>
 <span id="L43" class="LineNr"> 43 </span>  <span class="Conceal">¦</span> <span class="Delimiter">}</span>
 <span id="L44" class="LineNr"> 44 </span>  <span class="Delimiter">}</span>
 <span id="L45" class="LineNr"> 45 </span>  <span class="Normal">else</span> <span class="Normal">if</span> <span class="Delimiter">(</span>is_mu_container<span class="Delimiter">(</span><a href='030container.cc.html#L238'>payload_type</a><span class="Delimiter">)</span> || is_mu_exclusive_container<span class="Delimiter">(</span><a href='030container.cc.html#L238'>payload_type</a><span class="Delimiter">))</span> <span class="Delimiter">{</span>
 <span id="L46" class="LineNr"> 46 </span>  <span class="Conceal">¦</span> reagent tmp<span class="Delimiter">;</span>
 <span id="L47" class="LineNr"> 47 </span>  <span class="Conceal">¦</span> tmp<span class="Delimiter">.</span>type = <span class="Normal">new</span> type_tree<span class="Delimiter">(</span>*payload_type<span class="Delimiter">);</span>
 <span id="L48" class="LineNr"> 48 </span>  <span class="Conceal">¦</span> tmp<span class="Delimiter">.</span><a href='010vm.cc.html#L65'>set_value</a><span class="Delimiter">(</span><a href='043space.cc.html#L76'>address</a> + <span class="Comment">/*</span><span class="Comment">skip refcount</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">);</span>
-<span id="L49" class="LineNr"> 49 </span>  <span class="Conceal">¦</span> <a href='036refcount.cc.html#L61'>decrement_any_refcounts</a><span class="Delimiter">(</span>tmp<span class="Delimiter">);</span>
+<span id="L49" class="LineNr"> 49 </span>  <span class="Conceal">¦</span> <a href='036refcount.cc.html#L62'>decrement_any_refcounts</a><span class="Delimiter">(</span>tmp<span class="Delimiter">);</span>
 <span id="L50" class="LineNr"> 50 </span>  <span class="Delimiter">}</span>
 <span id="L51" class="LineNr"> 51 </span>  <span class="Comment">// clear memory</span>
 <span id="L52" class="LineNr"> 52 </span>  <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> curr = <a href='043space.cc.html#L76'>address</a><span class="Delimiter">;</span>  curr &lt; address+payload_size<span class="Delimiter">;</span>  ++curr<span class="Delimiter">)</span>
 <span id="L53" class="LineNr"> 53 </span>  <span class="Conceal">¦</span> <a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">,</span> <span class="Constant">0</span><span class="Delimiter">);</span>
 <span id="L54" class="LineNr"> 54 </span>  <span class="Comment">// append existing free list to address</span>
-<span id="L55" class="LineNr"> 55 </span>  <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">&quot;abandon&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;saving &quot;</span> &lt;&lt; <a href='043space.cc.html#L76'>address</a> &lt;&lt; <span class="Constant">&quot; in free-list of size &quot;</span> &lt;&lt; <a href='036refcount.cc.html#L91'>payload_size</a> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span>
-<span id="L56" class="LineNr"> 56 </span>  <a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> <a href='043space.cc.html#L76'>address</a><span class="Delimiter">,</span> <a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Current_routine<span class="Delimiter">-&gt;</span>free_list<span class="Delimiter">,</span> <a href='036refcount.cc.html#L91'>payload_size</a><span class="Delimiter">));</span>
-<span id="L57" class="LineNr"> 57 </span>  <a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Current_routine<span class="Delimiter">-&gt;</span>free_list<span class="Delimiter">,</span> <a href='036refcount.cc.html#L91'>payload_size</a><span class="Delimiter">,</span> <a href='043space.cc.html#L76'>address</a><span class="Delimiter">);</span>
+<span id="L55" class="LineNr"> 55 </span>  <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">&quot;abandon&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;saving &quot;</span> &lt;&lt; <a href='043space.cc.html#L76'>address</a> &lt;&lt; <span class="Constant">&quot; in free-list of size &quot;</span> &lt;&lt; <a href='036refcount.cc.html#L93'>payload_size</a> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span>
+<span id="L56" class="LineNr"> 56 </span>  <a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> <a href='043space.cc.html#L76'>address</a><span class="Delimiter">,</span> <a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Current_routine<span class="Delimiter">-&gt;</span>free_list<span class="Delimiter">,</span> <a href='036refcount.cc.html#L93'>payload_size</a><span class="Delimiter">));</span>
+<span id="L57" class="LineNr"> 57 </span>  <a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Current_routine<span class="Delimiter">-&gt;</span>free_list<span class="Delimiter">,</span> <a href='036refcount.cc.html#L93'>payload_size</a><span class="Delimiter">,</span> <a href='043space.cc.html#L76'>address</a><span class="Delimiter">);</span>
 <span id="L58" class="LineNr"> 58 </span><span class="Delimiter">}</span>
 <span id="L59" class="LineNr"> 59 </span>
 <span id="L60" class="LineNr"> 60 </span><span class="Delimiter">:(after &quot;Allocate Special-cases&quot;)</span>