Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Memory Leak in Mathematica?

  • To: mathgroup at
  • Subject: [mg54723] Re: Memory Leak in Mathematica?
  • From: Peter Pein <petsie at>
  • Date: Mon, 28 Feb 2005 03:27:11 -0500 (EST)
  • References: <cvhh4u$r6i$> <cvmi4f$3pg$>
  • Sender: owner-wri-mathgroup at

M.G. Bartlett wrote:
> John-
> Thanks for the response.  I was not aware that SetDirectory[] placed
> the old values of the directory on a stack.  I tried your suggested
> change to the code; however, the memory issue persists.  The number of
> files I am working on is large, bug not unreasonably so (there are
> about 3500 data files that Mathematica is being asked to process with
> this code - it tends to quit on my machine after about 2800).
> Any other ways I might be able to see which process within the code is
> consuming the memory?
> Thanks for your suggestions...
> Marshall Bartlett
I've run a test on my computer with 3000 files, each containing 123x123
random reals. I observed a linear increasing need of memory using Map[].

So I tried

and you can see an almost constant need of memory (varying up- _and_

hope, it helps


Peter Pein

  • Prev by Date: Re: Changing Plot Axis Displays
  • Next by Date: Re: Changing Plot Axis Displays
  • Previous by thread: Re: Memory Leak in Mathematica?
  • Next by thread: Controlling program flow across cells