Memory gush

I have the editor open, and the game running. I also have the windows Task Manager open, and am keeping a close eye on the Unity.exe process. At a certain point, memory usage starts climbing. At around 400mb, I hit pause on the editor. The memory usage is STILL climbing! I hit stop on the game, and memory usage is again, still climbing!

If I have the game paused, isn’t all my code inactive? Is it just unity’s editor that is homorraging ram?

thanks :expressionless:

I’ve also got a strange problem with memory usage on windows 7.
the same game that runs nicely on WinXP Professional SP3 seems to have a memory leak on Windows 7 64 bits… The memory usage grows like 2MB per second, til the game/engine freezes and crashes.
unity profiler dont seems to help,…

So unity people… are you going to leave us in the dark again? Can’t you give us at least a few pointer about this case?

I wouldn’t put too much thought into it, several reasons come to mind, when Unity first loads, it seems to go through the cache files which I am sure takes up memory and process, for instance, my gimp little test project with a cube and a www setup in it loaded in at 128 megs of ram used, within 1 minute of doing nothing it dropped down to 32 megs, then hitting play went up to 50 megs, stop didn’t drop, play went to 64 megs, stop, no drop, play 66 megs, stop no drop, play no gain, pause 1 meg drop, play 4 meg gain, stop 10 meg drop, build jump back up to 140 meg used, after the build was complete stayed at 140 megs of ram used, quit out, load up, started at where it left off, 140 megs used, within a minute, back down to 32 megs.

I am not a programmer for Unity by any stretch of the imagination, I just can assume that what you are seeing is caching / using the cache. Like having a living swap file in RAM. Nothing to sweat unless you have 512mb of ram, if so, get rid of that Pentium 1 and get something at least 10 years newer :slight_smile:

Hi zumwalt,

the problem is that, when may game runs on Windos 7, the memory usage only goes up! It never drops. Starts with 400 MB and, in about 5 minutes, it comes to 2 GB of memory usage! And the same game (a verion build on Unity) on Windos XP, stays at 400 MB. That’s why me and my team got so worried about this.

And, by the way, it’s a Pentium Core 2 Duo with 4GB memory =)

Hi again people,

i was looking again for the memory leak problem in my project, and apparently it was due a toon shadder we was using (it was from unity 2.5), and we didn’t update it when we upgrade our unity version to 3.0. Now, it seems to be okay.

Thanks for the help!