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.

 Respuesta aceptada

Jan
Jan el 28 de Dic. de 2013
"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.

Más respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 28 de Dic. de 2013

0 votos

1 comentario

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

Iniciar sesión para comentar.

Categorías

Más información sobre Installing Products en Centro de ayuda y File Exchange.

Preguntada:

Fei
el 28 de Dic. de 2013

Respondida:

Jan
el 28 de Dic. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by