|
|
back to boardI get MLE using only 600 Kb (without pointers). Can someone explaine it??? Posted by Kit 14 Mar 2005 21:34 I get memory limit exceed using only 600 Kb (without pointers). Can someone explaine it??? There is part of my program. {$APPTYPE CONSOLE} {$R+,Q+} program ural1037; const mem_max = 30001; delay = 600; type node = record parent, left, right: longint; min, time: longint; end; var tree: array [0..mem_max] of node; root: longint; time, num: longint; ch: char; procedure ... If you use recursion, it can fall in "perpetual cycle", so, on every call it eats memory, and You get MLE before Stack Overflow... (-) Posted by Heaven 15 Mar 2005 02:29 Re: If you use recursion, it can fall in "perpetual cycle", so, on every call it eats memory, and You get MLE before Stack Overflow... (-) Posted by Kit 15 Mar 2005 21:58 I have got AC, replacing some "integer" by "word" only, saving 120 Kb on it. So, there is no "perpetual cycle". Stack are used very small (less then 1Kb). Some other assumptions? Edited by author 15.03.2005 21:58 |
|
|