Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Flushing RAM in Mathematica

  1. Feb 13, 2012 #1
    I'm trying to plot some 3D functions in mathematica, but each time I evaluate the cell, more and more RAM gets eaten up.

    How do I clear the memory to keep this resonable? My PC almost crashed because I ate up all the memory. I tried ClearAll and ClearSystemCache[] and it didn't work.

    I'm new with Mathematica. Also Im using version 8

    thanks
     
  2. jcsd
  3. Feb 13, 2012 #2
    Buy some more RAM, it's very cheap!
     
  4. Feb 14, 2012 #3
    Try setting $HistoryLength to a modest value if you absolutely have to.

    http://reference.wolfram.com/mathematica/ref/$HistoryLength.html

    And as Greg said, having more memory than anyone tells you is reasonable will serve you well with Mathematica. 16Gig might be a reasonable amount today, only because we still don't see many boards that will accept 32 or 64 yet.

    Set your swap space to be about the same amount as your memory and when Mathematica starts hammering the drive with swapping that is a clue you need to start paying attention to the calculation sizes.

    Using memory is a good thing, not a bad thing, if memory isn't mostly committed to a task it is serving no purpose. Aim for perhaps 75% being used by Mathematica and peak at 180% with swapping.

    If the machine is going to crash with that then figure out what is wrong with the machine and fix that.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Flushing RAM in Mathematica
  1. In mathematica (Replies: 4)

  2. Mathematica and Sums (Replies: 4)

  3. Mathematica Sums (Replies: 6)

  4. Mathematica NDSolve (Replies: 27)

Loading...