Questions about RAM usage, including optimizing memory use, avoiding and fixing leaks and releasing unused memory.

learn more… | top users | synonyms

1
vote
0answers
37 views

SystemException[MemoryAllocationFailure] with Memoized function

Version 10.1 Win7x64 Enterprise. This is more of a report than a question but others may have seen the same / have insights. I have some code (that I can't really post as it's too big) with a large ...
6
votes
0answers
89 views

ListConvolve Memory Hemorrhage

I wrote a routine that convolves an impulse response array with a test array and checks for the RMS difference between that convolution and a data array. I do this iteratively so that I can modify the ...
1
vote
4answers
96 views

calculating subsets of a matrix (L=40X40)

I need to calculate all $k$-possible subsets$(k:1,L)$ of matrix with size $L$. I am using subset function as following, ...
2
votes
1answer
100 views

mathematica use too much memory to Import large dat file

Err... When I try to Import a .dat file by dat = Import["D:\\TIEGCM\\solar_input\\omni_m_all_years.dat", "Table"]; or ...
3
votes
1answer
108 views

Memory leak in MemberQ

Bug introduced in 10.0.0 and fixed in 10.0.2 Consider the following code. ...
0
votes
1answer
63 views

What is stored in the kernel's memory

I disabled "Show Suggestions Bar after last output" in the preferences. I begin my code with $HistoryLength = 0. After running my code, I run the following. ...
5
votes
1answer
99 views

Comparing memory consumption of two pieces of code

I have implemented something I want to do in two different ways, because I'm not sure which of the two approaches give best speed/memory efficiency. Comparing the speed of the two approaches is ...
3
votes
2answers
68 views

Memory Problem with Modules and NDSolve

I'm using NDSolve inside a module, and I appear to have a memory leak. The relevant code is: ...
-1
votes
2answers
138 views

Want to compute the permutations of {1, 2, …, 11} with only 3 GB of memory [duplicate]

There is another way to calculate Permutations [{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}] without triggering an error, I have 3 GB of RAM with WIN 7 Edit: This ...
2
votes
0answers
43 views

Does Mathematica support out-of-core Associations?

I often find myself collecting data in an Association[] which outgrows my computer's main memory. Does Mathematica support any out-of-core equivalent? Ideally, I ...
0
votes
0answers
94 views

Is there a way to give Mathematica extra memory?

I am running Mathematica 10 (Student Edition) on Mac OS X 10.7.5 on an old Mac Pro. I have lots of extra RAM that the system isn't touching, and I would like to give some of it to Mathematica in the ...
7
votes
0answers
91 views

What is stored in FrontEnd memory?

I quit the kernel, and closed all notebooks, leaving only the startup window. Yet when I open a new notebook, MemoryInUse[$FrontEnd] reveals that the FrontEnd still ...
1
vote
0answers
76 views

Avoid copying memory for each subkernel

Here is a simplified example illustrating my issue; ...
2
votes
1answer
79 views

Simple-looking Minimize takes for ever

Consider the following: Minimize[{(ξ - x)^2 + (η - y)^2, a ξ + b η == c}, {ξ, η}, Reals] After asking Mathematica to do this yesterday afternoon and forgetting ...
9
votes
0answers
124 views

How can the Theil-Sen estimator be made to work on larger datasets?

The Theil-Sen estimator finds the slope and intercept of a line passing through a set of points by calculating the median slope and median intercept of the set of lines passing through all possible ...
4
votes
1answer
88 views

Is there a way to constrain the memory used for a notebook (session)?

I know that we can constrain the memory usage of certain computation using MemoryConstrained. Is there a way to constrain the memory of each cell evaluation during ...
5
votes
1answer
179 views

Largest matrix size supported by Mathematica 10

I have need to store large square matrices in memory, some times sparse, some times not. I have used up to $2^{15}$ by $2^{15}$ as my upper bound so far, and Mathematica has handled it even if it took ...
3
votes
0answers
53 views

Compress uses too much memory and sometimes crashes the Kernel

Using Compress is a good idea to save memory when working with large expressions. The problem is that Compressing large expressions also uses a large amount of ...
20
votes
1answer
435 views

Excessive memory use by Mathematica kernel in 10.0.2 after executing simple commands

Update: The issue has been fixed in Mathematica 10.1! :) Warning: the code below may hang your system if you have the Suggestions Bar enabled in Mathematica < 10.1. When issuing the ...
0
votes
0answers
105 views

What is the largest system of PDE you have solved with Mathematica?

I need to solve a system of partial differential equations. In the simplest case it consists of 2000 of PDE equations. In the most complex situation it consists up to 1 million of such equations. ...
4
votes
1answer
189 views

Table and memory efficiency

Consider these two types of creating matrices: Table[Table[i*j,{i,1,10}],{j,1,10}] Table[i*j,{i,1,10},{j,1,10}] I want to know if there is any difference ...
3
votes
1answer
111 views

How to know each variable used how much RAM

Is it possible to know what percentage of total used RAM by MMA is used by individual variables? I want to know how the total used RAM is distributed among different variables. ...
10
votes
2answers
663 views

Rendering thousands of points

I am trying to render an image with some 120,000 Points. Technically it's just 10,000 points, plus their reflection, plus 5 rotations of both of those sets, but I'm ...
1
vote
0answers
103 views

Fast export of large numerical data

Edit It seems that the bottelneck is not due to eigen value problem. I will esit the question soon. I have a 6000by6000 matrix which I got after some calculations. I want to get the eigenvalues and ...
2
votes
0answers
51 views

How to use nest to reduce the memory eatting of mma?

I enconter a problem about number: If we have 5+3+2=151022 9+2+4=183652 8+6+3=482466 5+4+5=202541 then 7+2+5=? It is easy to get the first two group of numbers? for the ...
0
votes
1answer
76 views

FindMinimum runs out of Memory

I have a function (its rather long, but does not matter) which when evaluated (1000s of times) runs fine. However, when I try to find its optimal parameters using ...
2
votes
2answers
49 views

Large Tuples with Negative Integers

I am trying to run a loop that cycles through the elements of Tuples[{-1,0,1},116] and terminates when a desired result is found. Unfortunately, this creates a memory problem due to 116. All of ...
15
votes
1answer
314 views

Why does this line increase the consumed memory?

Probably this is a simple question, however I really don't understand this behavior in Mathematica. It particularly leads to a memory leak in a huge program I have to do processing of 3D images. I ...
10
votes
2answers
231 views

Is there a way to control V10's undo length?

This may be a duplicate (if so I will remove this), but I was having trouble finding the relevant bit of documentation to fix it. I noticed that my FrontEnd memory ...
1
vote
0answers
124 views

Mathematica using all available RAM [closed]

I want to fit a function with 100 parameters. When I use FindMinimum, Mathematica uses all the 24GB RAM in my PC and ultimately crashes. However, if I use ...
3
votes
0answers
89 views

Increasing MaxPoints in NDSolve results in memory issue

I am interested in increasing "MaxPoints" in NDSolve's "MethodOfLines" in attempt to increase the resolution of the plot of the solution of linearly damped wave equation with transparent boundary ...
0
votes
1answer
126 views

How smart is Solve? Figuring out what tricks I should try

I'm trying to solve a large system (~10000) of linear equations using Solve, but the process keeps failing. As-is, I don't know whether it's failing because it's using too much memory or too much time ...
2
votes
0answers
46 views

distributing definitions in an .m file and memory

I am dealing with a huge table stored in an .m file of size 4 GBs. Somehow when I call the table in .nb file it seems the memory increases not by 4 GBs but more than 10GBs (roughly checking from task ...
0
votes
1answer
106 views

How can I resolve the insufficient memory to complete the computation problem for solving function with iterated variables?

I am trying to solve for a value x in a function where the variables varies with iterations of K. Also, there is one variable called "rvsum" which is updated with a certain formula as well. I have ...
4
votes
1answer
230 views

Insert large amount of data in HSQL

I create HSQL database with one table ...
6
votes
1answer
346 views

Optimizing Monte Carlo simulation of a Pred-Prey model

My assignment and code As part of an assignment for one of my classes, I'm trying to run a "massive" Monte Carlo simulation in Parallel on the follow model: ...
3
votes
1answer
130 views

May I restrict caching to disk when memory runs low? [duplicate]

An hour ago, I had to hard reset my laptop again because Mathematica froze the system again. When import a large file or make a mistake that produces huge arrays with complicated entries etc., I often ...
1
vote
1answer
155 views

Strange behavior of function (memory leaks)

I have some funtion: ...
4
votes
3answers
227 views

Is there something wrong with this piece of code involving Manipulate?

I am playing around with the Manipulate sentence. I think the following code is right, and actually Mathematica 9.0 doesn't return any error message, but I am ...
3
votes
0answers
152 views

Memory problem in Mathematica 10

I'm having a problem with memory. I'm doing nonliner fits of several data lists to a system of differential equations. When I evaluate the "Do" cycle the memory grows with the iteration step up to my ...
0
votes
1answer
63 views

Restarting Mathematica causes an animation to fail to run [duplicate]

I've tried animating two different sets of 3D plots. Interestingly, one plot will always work, regardless of whether I restart Mathematica, yet another plot will only work in its current Mathematica ...
3
votes
1answer
63 views

Manipulate inside a function definition slows down when passed a large data set

I'm working with large data sets (>1gb) which I'm visualizing with Manipulate[]. The following example works fine for me with no additional memory overhead: ...
20
votes
3answers
752 views

DeleteDuplicatesBy is not performing as I'd hoped. Am I missing something?

Déjà vu: a new-in-v10 function should provide a better solution to an old problem, but my enthusiasm is curbed when I run timings. This time the function is ...
5
votes
1answer
198 views

Using cursors with result sets to reduce memory usage

I have a database table with 900,000 rows and 80 columns per row which I'd like to work with in mathematica. My computations are isolated to each row, so I'd like to stream only a single row (or small ...
4
votes
0answers
69 views

Possible JLink memory leak (during) object creation

Using MMA 9.0.1 on win7-64. When creating a large number of java objects I noticed memory being consumed in huge quantities (several Gb). This memory is returned/deallocated after my call ...
0
votes
0answers
65 views

Using less memory to store and manipulate specific types

Is there a simple way to use Integer types (in particular, a table of Integer types) that require only 4 or 8 bytes (reps. 32 and 64 bits) representation? It seems that integers in Mathematica have a ...
24
votes
3answers
1k views

Smooth Peter de Jong attractor

Today I was playing with Peter de Jong attractor. At the bottom of the page I've linked there are beautiful examples like: My attempts are not so great: It is around 10^5 points. For more than ...
5
votes
1answer
238 views

Higher RAM handling by 32bit Mathematica [closed]

Can 32 bit Mathematica run program which requires more than 4GB RAM ?
1
vote
2answers
105 views

Clearing arguments passed to a Module

Is there a possible way to clear the arguments passed to a module to release some memory. I believe that arguments passed to modules are passed by value rather than pass by reference. e.g. I have the ...