Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

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

Search the Archive

Re: Odd memory behavior, and uncontrollable memory growth

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40069] Re: Odd memory behavior, and uncontrollable memory growth
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 18 Mar 2003 05:49:58 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <b4ub7d$qka$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

set the $HistoryLength=0;
may help you.

Regards
  Jens

nafod40 wrote:
> 
> Hola,
> 
> We are writing code where semi-complicated functions get run thousands
> of times in packages. when we do this, we are getting memory use growth
> that eventually drives the system to virtual memory, and severe speed
> penalties.
> 
> I have been trying to gain an understanding of this process, and came up
> with the following odd example that makes no sense to me. Can someone
> explain?
> 
> a=MemoryInUse[];
> (q=tempFunk[10000];1);
> d=MemoryInUse[];
> d-a
> 
> The memory bumps up by 1080 bytes per iteration. It  climbs, but slowly.
> I figure that is justified by the In[] and Out[] storage. Now one small
> change...
> 
> a=MemoryInUse[];
> (q=tempFunk[10000];);
> d=MemoryInUse[];
> d-a
> 
> Now the memory jumps by 80,000 bytes per iteration! All I did was remove
> the "1" from within the parentheses. What's up with that? I tried this...
> 
> a=MemoryInUse[];
> (q=tempFunk[10000];);
> q=1;
> d=MemoryInUse[];
> d-a
> 
> To force the clearing of 'q', still it jumps by leaps and bounds. Any
> ideas why?


  • Prev by Date: Re: Don't understand Plot behavior
  • Next by Date: Re: Increase in efficiency with Module
  • Previous by thread: Re: Odd memory behavior, and uncontrollable memory growth
  • Next by thread: Re: Compile + Module =X> Memory Leak; Outer & Compile =>Memory Leak