MathGroup Archive 2009

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

Search the Archive

Memory Management Issue - Possible Bug or Incompatibility w W7?

  • To: mathgroup at
  • Subject: [mg104395] Memory Management Issue - Possible Bug or Incompatibility w W7?
  • From: telefunkenvf14 <rgorka at>
  • Date: Fri, 30 Oct 2009 02:18:49 -0500 (EST)

First off, my machines both run Mathematica 7.0.1 on Windows 7
Professional x64. My tablet pc has 4GB memory and my desktop has 6GB.

Last week I was trying to work with some raw .txt files from the
Census. The size of a typical .txt file ~15meg.

When I tried using Import[], Mathematica would quickly grind to a
hault. After some searching in the user group about memory management
tricks (such as ClearSystemCache[] and setting $HistoryLength=0) and
using streams, I was able to get my assignment done.

I used the following code to get around the problem:

o = OpenRead["file"];
s = Skip[o, Record, skipto];
l = ReadList[o, Record, RecordLists -> True];
m = MatrixForm[l][[All, 1 ;; year]];

Even though this worked, I STILL noted that memory usage reported in
W7 was extremely high (and yes, I had restarted the kernal before
applying the workaround).

Anyways, this week I've been trying to work on some audio files for an
EE assignment, and continue to suffer from the same general issue. As
an example, one file I want to work with is a 16-bit .wav, 40 seconds
in length, of an 'exponential chirp'. File size around 3.5meg.

On a fresh startup, executing Import["chirp.wav","data"] eats nearly
75% of my 4GB of memory!! Below is a link to a screenshot of
importing, followed by MemoryInUse[], MaxMemoryUsed[], and a ByteCount
[] estimate for a calculation that I had been trying perform
previously (using streams rather than Import; same issue). Note the W7
system memory usage reported (3,154meg) vs. what Mathematica says
(~64meg) is being used.

And the notebook, if you're interested:

Might this be caused by Wolfram's file indexing service? Other ideas?


  • Prev by Date: bitmap with bit depth 1
  • Next by Date: Re: Re: SetterBar/ButtonBar, Dynamic and the visual
  • Previous by thread: Re: bitmap with bit depth 1
  • Next by thread: Discrete functions - Pure function domain