maxsize of array on matlab 64bit?

i have checked , that my matlab is 64bit, installed in Ubuntu 64bit.
i tested this x = zeros( 2^31,1 );
is ok.
but
x = zeros( 2^32,1 );
tell me "Out of memory. Type HELP MEMORY for your options."
for 64bit Matlab, maxsize is 2^48 right? http://www.mathworks.de/de/help/matlab/ref/computer.html
my license is for academic.

 Accepted Answer

"Out of memory" means, that the operating system cannot find enough free contiguous memory. This does not mean, that the maximum array size is exceeded:
a = zeros(2^53, 1)
??? Error using ==> zeros
Maximum variable size allowed by the program is exceeded.
If there is enough free memory depends on other variables, the fragmentation of the memory, the size of the RAM and the virtual memory as well as other applications. Obviously one or more of these reasons prevent your Matlab session from reserving 2^32 elements. As far as I remember feature('memstats') works under Windows only, but Linux offers tools to control the memory requirements of programs also.

More Answers (1)

Azzi Abdelmalek
Azzi Abdelmalek on 28 Dec 2013

1 Comment

i found it.
do you agree with me, that x = zeros( 2^32,1 ) should be working ?

Sign in to comment.

Categories

Asked:

Fei
on 28 Dec 2013

Answered:

Jan
on 28 Dec 2013

Community Treasure Hunt

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

Start Hunting!