• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Discussion Memory usage in Studio 2

chance

predictably random
Forum Staff
Moderator
I've noticed an odd pattern in memory usage when projects first run. According to the debugger, memory usage increases slowly over the first 20-30 seconds, and then levels off at some final value. Even completely empty projects do this. Memory usage starts around 4000 kB, then increases to about 6500 kB over 20 seconds or so, and stops there.

Is this just a quirk in how the debugger averages memory usage? Or something else?

Not a big deal, but it can be misleading if you're looking for memory leaks.
 

chance

predictably random
Forum Staff
Moderator
I'm talking about memory usage reported by Studio 2 debugger itself. I run the game from the IDE, using Studio 2 debugger mode. (I love that new icon, btw. ;))

When the debugger window opens, "FPS" and "memory used" values are displayed at the bottom of that window. So I assume this refers to memory used by the runner as it runs the game.

Just to summarize: Studio 2 debugger shows memory usage steadily increase for 30 seconds or so, and then level off. Just curious why.

The only reason I raise the issue is because it may cause confusion for users looking for memory leaks.
 
Last edited:

Mike

nobody important
GMC Elder
Not sure. Its basically the same as 1.x just now.... file it as a bug and someone will take a look.
 

chance

predictably random
Forum Staff
Moderator
If this is a real bug, it's hard to imagine other users haven't seen it. Because it looks like a classic memory leak. Except it isn't, because memory usage levels off after 30 sec (or so), at about 2 MB higher than it started. And then it stays fixed. That's not a memory leak.

Sounds like I'm the only one seeing this strange behaviour. Maybe my Studio 2 beta installation is bugged?

I'm curious to hear what other Studio beta users see when they run the debugger.
 

chance

predictably random
Forum Staff
Moderator
and an empty project also increased?
Yes. According to the Studio 2 debugger, a totally empty project starts with about 4700 KB of memory used, then increases steadily to about 6700 KB over 20-30 seconds. Then the memory usage stays constant.

Pretty sure now this is just a bug in my installation (or something about my Win 10 OS). But I'm curious what numbers you see when you run the Studio 2 debugger.
 
This is mine in an empty project



Memory used is stable to that number, even after 2 minutes
It starts from 9500 and stabilizes to 11860, I think it's a normal behavior

PS: why my memory used is greater than yours (you said 4-7000) ?
 
Last edited:

Mike

nobody important
GMC Elder
If its not continually climbing, it's not a leak.... might be using a fair bit, but its only a leak if it keeps going up! :)

c# does have odd memory patterns though due to its managed memory.
 

chance

predictably random
Forum Staff
Moderator
If its not continually climbing, it's not a leak.... might be using a fair bit, but its only a leak if it keeps going up! :)

c# does have odd memory patterns though due to its managed memory.
@Mike: as I said above, it's not a leak. It increases by several megabytes, then stabilizes after 20-30 seconds. I was just curious why it behaves differently than GM 1.x, where memory usage is stable almost immediately.

That was my question from the beginning. So I'm glad to hear others are seeing the same thing (finally). And glad to hear you say it's probably normal, due to C# memory management (finally ;)).

Again, the only issue I see with this, is users mistakenly thinking they had a memory leak because they didn't let the game run long enough to stabilize.
 
Last edited:
Top