MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Question about memory consumption in my codes by using Mathematica


Thank you very much for your suggestion!
But I wonder whether it is necessary to do so in Mathematica? Why
Module[] can not handle the memory as effectively as Block[]? Maybe, I
should read more carefully the reference.
Thanks again!

On Aug 15, 4:33 pm, Jens-Peer Kuska <ku... at informatik.uni-leipzig.de>
wrote:
> Hi,
>
> try Block[] instead of Module[] ..
>
> Regards
>    Jens
>
>
>
> foxvexonwrote:
> > I write a routine that repeats loading and treating a large amount of
> > data imported from external data files produced by another program. I
> > enclose codes for this task in a simple Module[{local_vars},
> > expressions]. Of'cause, it calls pre-defined routines outside but does
> > not introduce any new variable except temple local ones.
>
> > I am confused that If this is done for just one or two loops/times, it
> > works well. But if I hope to run this loop several times, like 10~200,
> > Mathematica usually reports memory consumed out and terminates
> > automatically.
>
> > I check my codes over and over to make sure that I do not introduce
> > new variables in each loop that will eat up memory every time. But, I
> > do notice (from windows task manager) that the used memory by
> > Mathematica 6 is increasing with each loop.
>
> > Please help! Thanks a lot in advance!- Hide quoted text -
>
> - Show quoted text -




  • Prev by Date: Re: PSLQ
  • Next by Date: Re: is there a better way to do constraint logic programming in Mathematica?
  • Previous by thread: Re: ndsolve ndsv problem
  • Next by thread: Help with numerical differentiation