Re: Memory leaks problem

*To*: mathgroup at smc.vnet.net*Subject*: [mg132307] Re: Memory leaks problem*From*: Bob Hanlon <hanlonr357 at gmail.com>*Date*: Thu, 6 Feb 2014 03:45:36 -0500 (EST)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*Delivered-to*: l-mathgroup@wolfram.com*Delivered-to*: mathgroup-outx@smc.vnet.net*Delivered-to*: mathgroup-newsendx@smc.vnet.net*References*: <20140205082549.5383569ED@smc.vnet.net>

You can reduce the size of the leak by using Share ClearAll["`*"]; $HistoryLength = 0; n = 5; Do[ Share[]; bound = Table[ {wsk, Integrate[Sin[p], {p, 0, 3}]}, {wsk, 1, 100}]; ClearAll[bound]; Print[MemoryInUse[]], {st, 1, n}]; 32384792 32022008 32365888 32648816 32860496 Bob Hanlon On Wed, Feb 5, 2014 at 3:25 AM, <bar at robox.ii.up.krakow.pl> wrote: > Hello, > > I have a problem : memory disappears (leaks) during calculation, > > code: > =============================== > ClearAll["`*"]; > $HistoryLength = 0 > n = 5; > Do[bound = Table[{wsk, Integrate[Sin[p], {p, 0, 3}]}, {wsk, 1, 100}]; > ClearAll[bound]; > Print[MemoryInUse[]] > ,{st, 1, n}]; > ================================= > output: > ---------------------------------- > 24971664 > > 25168576 > > 25365240 > > 25593976 > > 25789224 > ---------------------------------- > > When I used simple calling function ( Sin[] instead of Integrate[Sin[]] > this effect didn't occure. > I tried $HistoryLength = 0, ClearAll[bound] and also with no effects > > In my real calculation I used more complicated function . I tried to obtain > tables of numerical intergrated functions and I was saving it step by step > to the file. > > After many steps my all memory leaked and server crashed ( 48 GB RAM) > The table "bound" contained only 50 numerical results of integration per > one step > > (system Linux Scietific , Fedora, Ubuntu) > > > Have you any ideas ? > > With Best Regards, Olaf > > >

**References**:**Memory leaks problem***From:*<bar@robox.ii.up.krakow.pl>