I seem to have loads of free RAM even though my script is taking 10 minutes to run

1 view (last 30 days)
I seem to have loads of free RAM even though my script is taking 10 minutes to run. I have a MacBook Pro i7 with 8GB of RAM and I use a small app called 'Memory Freer' to free up inactive memory. It shows how much RAM is wired/available/free/inactive. I have a script which has different options for the length of one of the variables, N, and I'd like to try out a few of the longer ones, but above a certain length, N, it starts to take my computer upwards of 2 minutes to do it. While this is happening, Memory Freer still says that there's over 4 GB of free RAM. How do I make Matlab use this RAM?
I've looked at the Java memory option in preferences, but that only lets you give it up to 256 MB.
Any help would be great.
  1 Comment
Matt Fig
Matt Fig on 2 Nov 2012
Tom's question
I seem to have loads of free RAM even though my script is taking 10 minutes to run. I have a MacBook Pro i7 with 8GB of RAM and I use a small app called 'Memory Freer' to free up inactive memory. It shows how much RAM is wired/available/free/inactive. I have a script which has different options for the length of one of the variables, N, and I'd like to try out a few of the longer ones, but above a certain length, N, it starts to take my computer upwards of 2 minutes to do it. While this is happening, Memory Freer still says that there's over 4 GB of free RAM. How do I make Matlab use this RAM?
I've looked at the Java memory option in preferences, but that only lets you give it up to 256 MB.
Any help would be great.

Sign in to comment.

Accepted Answer

Bjorn Gustavsson
Bjorn Gustavsson on 5 Apr 2012
Well, then it seems as if memory is not the limiting factor for the performance of your algorithm, maybe CPU-time/cycles are what start adding up for larger N. So maybe your algorithm is O(N^m) (or worse?) with m larger than 1, perhaps even larger than 3?
It is a bit difficult to have a more detailed opinion given amount of information.
HTH

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!