From 298f8065857630e414d84e4ee785a6d17e5f99bb Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 5 Jul 2016 01:08:00 -0700 Subject: 3102 --- html/037abandon.cc.html | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'html/037abandon.cc.html') diff --git a/html/037abandon.cc.html b/html/037abandon.cc.html index a6acff2f..661b2bb8 100644 --- a/html/037abandon.cc.html +++ b/html/037abandon.cc.html @@ -102,25 +102,20 @@ map<int, (Current_routine->free_list, payload_size, address); } -:(before "ensure_space(size)" following "case ALLOCATE") +:(after "Allocate Special-cases") if (get_or_insert(Current_routine->free_list, size)) { trace(9999, "abandon") << "picking up space from free-list of size " << size << end(); int result = get_or_insert(Current_routine->free_list, size); trace(9999, "mem") << "new alloc from free list: " << result << end(); put(Current_routine->free_list, size, get_or_insert(Memory, result)); - for (int curr = result+1; curr < result+size; ++curr) { + put(Memory, result, 0); + for (int curr = result; curr < result+size; ++curr) { if (get_or_insert(Memory, curr) != 0) { raise << maybe(current_recipe_name()) << "memory in free list was not zeroed out: " << curr << '/' << result << "; somebody wrote to us after free!!!\n" << end(); break; // always fatal } } - if (SIZE(current_instruction().ingredients) > 1) - put(Memory, result+/*skip refcount*/1, ingredients.at(1).at(0)); - else - put(Memory, result, 0); - products.resize(1); - products.at(0).push_back(result); - break; + return result; } :(scenario new_differing_size_no_reclaim) -- cgit 1.4.1-2-gfad0