Skip to content

cannot allocate memory

4 messages · Uwe Ligges, Bernardo Rangel Tura, DumpsterBear

#
I am getting "Error: cannot allocate vector of size 197 MB".
I know that similar problems were discussed a lot already, but I
didn't find any satisfactory answers so far!

Details:
*** I have XP (32bit) with 4GB ram. At the time when the problem
appeared I had 1.5GB of available physical memory.
*** I increased R memory limit to 3GB via memory.limit(3000)
*** I did gs() and got
                used  (Mb) gc trigger   (Mb)  max used   (Mb)
Ncells    147534   4.0     407500   10.9    407500   10.9
Vcells 104939449 800.7  186388073 1422.1 185874684 1418.2

The garbage collection didn't help.

Any ideas? Many thanks in advance!

-- Adam
#
DumpsterBear wrote:
Have you told Windows to allow processes of more than 2GB?
gc(), I think.

Uwe Ligges
#
Em Ter, 2008-09-23 ?s 21:42 -0400, DumpsterBear escreveu:
Adam,

First, is possible 32bit XP use all your 4Gb?

Second, I think you say "gc" whem say "gs", so in my computer (Ubuntu
64bit with 4Gb):
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 188975 10.1     407500 21.8   350000 18.7
Vcells 169133  1.3     786432  6.0   786378  6.0
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 188951 10.1     407500 21.8   188951 10.1
Vcells 168893  1.3     786432  6.0   168893  1.3

If you read gc help:

reset: logical; if 'TRUE' the values for maximum space used are
          reset to the current values.

Other issue is options for rgui command.
Have a option "--max-mem-size" that you modify to expand you RAM
avaiable
#
Yes, I did. But this only matters if R requests a memory block of size
bigger than 2GB
at one time. As I wrote, I had 1.5GB available of physical memory out of my 4GB.
Yes, indeed.

Many thanks, Adam