From 29a92072feab70aabf1602ec94b18d000ade93bc Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 24 Apr 2015 22:55:25 -0700 Subject: 1190 --- cpp/042new.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/cpp/042new.cc b/cpp/042new.cc index d268e6ca..01536689 100644 --- a/cpp/042new.cc +++ b/cpp/042new.cc @@ -12,12 +12,16 @@ recipe main [ :(before "End Globals") size_t Memory_allocated_until = 1000; +size_t Initial_memory_per_routine = 100000; :(before "End Setup") Memory_allocated_until = 1000; +Initial_memory_per_routine = 100000; :(before "End routine Fields") size_t alloc; :(replace{} "routine::routine(recipe_number r)") routine::routine(recipe_number r) :alloc(Memory_allocated_until) { + alloc = Memory_allocated_until; + Memory_allocated_until += Initial_memory_per_routine; calls.push(call(r)); } @@ -117,10 +121,3 @@ recipe f2 [ 3:boolean <- equal 1:address:integer, 2:address:integer ] +mem: storing 0 in location 3 - -:(before "End Globals") -size_t Initial_memory_per_routine = 100000; -:(before "End Setup") -Initial_memory_per_routine = 100000; -:(after "routine::routine(recipe_number r)") - Memory_allocated_until += Initial_memory_per_routine; -- cgit 1.4.1-2-gfad0