From 987b630476eff43467905299d936c388f28d3fc6 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 13 Apr 2017 22:26:25 -0700 Subject: 3820 --- html/037abandon.cc.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'html/037abandon.cc.html') diff --git a/html/037abandon.cc.html b/html/037abandon.cc.html index b862337f..6ce3e661 100644 --- a/html/037abandon.cc.html +++ b/html/037abandon.cc.html @@ -81,7 +81,7 @@ if ('onhashchange' in window) { 16 :(before "End Decrement Refcount(old_address, payload_type, payload_size)") 17 if (old_refcount == 0) { 18 trace(9999, "mem") << "automatically abandoning " << old_address << end(); - 19 abandon(old_address, payload_type, payload_size); + 19 abandon(old_address, payload_type, payload_size); 20 } 21 22 //: When abandoning addresses we'll save them to a 'free list', segregated by size. @@ -90,7 +90,7 @@ if ('onhashchange' in window) { 25 map<int, int> free_list; 26 27 :(code) - 28 void abandon(int address, const type_tree* payload_type, int payload_size) { + 28 void abandon(int address, const type_tree* payload_type, int payload_size) { 29 trace(9999, "abandon") << "updating refcounts inside " << address << ": " << to_string(payload_type) << end(); 30 //? Total_free += size; 31 //? ++Num_free; @@ -104,22 +104,22 @@ if ('onhashchange' in window) { 39 ¦ int element_size = size_of(element); 40 ¦ for (int i = 0; i < array_length; ++i) { 41 ¦ ¦ element.set_value(address + /*skip refcount and length*/2 + i*element_size); - 42 ¦ ¦ decrement_any_refcounts(element); + 42 ¦ ¦ decrement_any_refcounts(element); 43 ¦ } 44 } 45 else if (is_mu_container(payload_type) || is_mu_exclusive_container(payload_type)) { 46 ¦ reagent tmp; 47 ¦ tmp.type = new type_tree(*payload_type); 48 ¦ tmp.set_value(address + /*skip refcount*/1); - 49 ¦ decrement_any_refcounts(tmp); + 49 ¦ decrement_any_refcounts(tmp); 50 } 51 // clear memory 52 for (int curr = address; curr < address+payload_size; ++curr) 53 ¦ put(Memory, curr, 0); 54 // append existing free list to address - 55 trace(9999, "abandon") << "saving " << address << " in free-list of size " << payload_size << end(); - 56 put(Memory, address, get_or_insert(Current_routine->free_list, payload_size)); - 57 put(Current_routine->free_list, payload_size, address); + 55 trace(9999, "abandon") << "saving " << address << " in free-list of size " << payload_size << end(); + 56 put(Memory, address, get_or_insert(Current_routine->free_list, payload_size)); + 57 put(Current_routine->free_list, payload_size, address); 58 } 59 60 :(after "Allocate Special-cases") -- cgit 1.4.1-2-gfad0