- Home /
Problems with Out of Memmory (GC)
I have some problems with getting enough memory to declare some very very very large objects. its a Color[1024x1024x32] to load into a 3DTexture. Unfortunately 3DTexture does not support Color32.
Anyways, When I doing my scene terrain generation (seperate scene actualy) I used up to about 500megs (the data is then saved into a file)
Then when Load the scene that builds the 3DTexture and loads the data. It will run out of memory (throwing the exception). The GC says the 500megs is still declared.
However, if I restart unity (or the program) after running the generation. It Runs with no problems.
I've run the generator multiple times, and I doesn't show any leaks, (Never goes beyond 500, always fluctuates around it)
Also, the generation does happen in a separate thread; Any Recommendations?
500$$anonymous$$bs is not a lot of memory (frequently games run on 1Gig+). Is your computer able to handle that much memory?
Yes, I have 16gigs in this rig, what happens is during the declaration of the Color[] it can add ontop of the 500 megs an additional 1 to 1.5 gigs, since unity is only 32 bit, it cannot access more than 2 gigs of memmory
As far as I know, Unity.exe is compiled with LARGEADDRESSAWARE flag, so it can handle over 2GB memory.
Your answer
Follow this Question
Related Questions
Generating cars in a parking garage? 1 Answer
Texturing Marching Cubes terrain when digging 0 Answers
Generated mesh depth error with Diffuse/Transparent shader 0 Answers
Dungeon generator without corridor 1 Answer
C# Proceducal Mesh terrain 2 Answers