- Home /
Fatal Error - Could not allocate memory
This stupid error message keeps showing up when I edit my map and add things to my map. The timing is random and it crashes my Editor every time. My map is very large and I'm almost certain this is what's causing it but I need my map to be large because its an open world RPG game and I am using multiple servers to host the game along with multiple graphics settings. None of these have been set yet however, the game has 11 zones wide by 14 zones long and each zone is 5000x5000 with a height of 1000. If there is a way around this please help me out! Thanks is advance to any advice givers!
Buenas tardes, por favor si pudieran ayudarme a resolver ese problema que muestra la imagen :D, cada vez que hago correr una escena en donde tiene varios recursos se cuelga la maquina y me sale ese error de memoria :( espero poder contar con su ayuda por favor
Approximate trad:
Good afternoon, if you could please help me solve this problem displaying the image: D, every time I run a scene where several resources machine hangs and I get the memory error :( I hope I can count on your help please
Answer by rutter · Jul 27, 2014 at 05:38 AM
Unity's a 32-bit application, which means that you're forced to operate within the limits of a 32-bit memory space. In particular, you can address at most 2^32 bytes of memory, and some operating systems apply specific restrictions beyond that; running a 32-bit app in Windows, for example, your max effective heap size is usually near or under 2GB. The numbers quoted in that error message are pushing that hard -- specifically, it looks like your heap is running out of address space.
It's also possible that rampant heap allocation has led to memory fragmentation. If that's the problem, a restart or reboot might help.
64-bit editor support may be coming with Unity 5.
Depending on what exactly you're doing, you might be able to free system resources prior to expensive operations... or, if running your game at all is too taxing, you might be able to optimize the game's architecture to help.
For example, do you really need everything in one monolithic map? Can you stream content in and out? Is there anything you can do to reduce heap allocation, both in the editor and while the game is running? These are challenges that many open-world games have to address during development.
Your answer
Follow this Question
Related Questions
my project broken help me 1 Answer
License issue detected! 3 Answers
Fatal Error in GC 0 Answers
Debug.log firing late? 2 Answers