I tried to convert large (~180MB) .xyz file into vector through v.in.ascii in QGIS Brighton (2.6.0) Grass plugin (it should be Grass version 6.4.3). The "primitive registration" stage lasted very long and then ended with following error: G_realloc: unable to allocate 46320000 bytes of memory at cindex.c:108. It seems that GRASS can't allocate more than ~45MB of input data; 45MB is tiny compared to my RAM of 2GB, so the problem is probably caused by some limit in GRASS or in QGIS, and probably related specifically to v.in.ascii method, because r.in.xyz worked and didn't throw this problem.

Why is there such a limitation, and how to bypass it?

According to a comment in a related question, this problem should be fixed in Grass 7. However, I wish to use GRASS in the QGIS plugin form, and it will take months before it will be upgraded to GRASS 7.

Is there any way how to solve it with GRASS 6?

OS: Windows 7 (64-bit)
QGIS architecture: 32-bit
SWAP file: 4096MB

I doubled the SWAP file size and the error is the same.

  • 45Mb might be small, but it's unlikely you have the full 2Gb available -- Windows 7 steals more that half of that without any other resident applications. Other variables include swap space ("virtual memory") and the application word size (32-bit applications can't address more than 1-1.2 Gb total memory, ever), and the amount of RAM dedicated to other things. Please edit the question to include the OS, swap, word size, and an indication of what the OS reports as free as the job runs.
    – Vince
    Mar 13 '15 at 11:08
  • Obviously 4Gb is too small for swap. I never hit virtual RAM if I can avoid it, but my W7 systems have 8Gb RAM (which feels too small, so I'm leaning towards an upgrade to 16Gb soon). 3-D GIS requires significant RAM, and swap is five orders of magnitude slower than physical memory (6ms vs 40ns seek). Try increasing swap, then report what Windows has to say about available memory.
    – Vince
    Mar 13 '15 at 12:48

Large file support (not sure if it is already needed in your case being on Windows) has been added also for vector data to GRASS GIS 7.0.

For details, see


  • How big files are "large files", needing the GRASS 7's support? Is there some hardcoded limit to prevent executing bigger files in GRASS 6, causing the problem I'm facing?
    – Pavel V.
    Mar 16 '15 at 8:07
  • Normally 32bit systems are limited to 2GB (2^31) per file. Large file support overcomes this limit.
    – markusN
    Mar 16 '15 at 20:28
  • bad news for me - that 45MB limit seems unlikely to be so closely connected with that 2GB limit.
    – Pavel V.
    Mar 17 '15 at 6:17
  • 2
    How about using GRASS GIS 7 right away for this task?
    – markusN
    Mar 18 '15 at 18:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.