Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80841] Re: Question about memory consumption in my codes by using Mathematica
  • From: foxvexon <yulinwei at gmail.com>
  • Date: Tue, 4 Sep 2007 03:39:41 -0400 (EDT)
  • References: <f9s47u$ao7$1@smc.vnet.net><f9udns$ar5$1@smc.vnet.net>

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