Advertisement

Anyone got any ideas where 4k a sec is coming from?

Started by March 31, 2015 06:12 PM
40 comments, last by Brain 9 years, 7 months ago

By any chance do you have to free the event raised by sdl_pollevent?


he's passing in the structure which is being filled out, it's all on stack memory.
Check out https://www.facebook.com/LiquidGames for some great games made by me on the Playstation Mobile market.

I recall there being one event that allocates memory and requires you to release it (though that's highly unlikely to be the cause) - double check the documentation.

Edit: You can always look into the SDL2 source (just search google). The two repositories I found are https://github.com/spurious/SDL-mirror and https://github.com/zielmicha/SDL2

Advertisement

By any chance do you have to free the event raised by sdl_pollevent?

he's passing in the structure which is being filled out, it's all on stack memory.
We don't know this for sure.

SDL_PollEvent could be allocating memory and putting a pointer to it into the stack allocated event variable. Docs would tell this for sure.

Of course, this is purely guess work as I'm completely out of any other ideas..

Is this causing an actual problem? Other than the potentially eronous values in taskmanager?

When writing any software, there are too many actual challenges to spend time chasing ghosts.

Why is this not important, if I leave this program running for 5-10 mins it ends up as a 160mb file size instead of a 5mb one that it should be.

Am I missing the point here, games in my experience don't randomly Octuple themselves into infinity.

If you get near a point, make it!

Is this causing an actual problem? Other than the potentially eronous values in taskmanager?
When writing any software, there are too many actual challenges to spend time chasing ghosts.


Why is this not important, if I leave this program running for 5-10 mins it ends up as a 160mb file size instead of a 5mb one that it should be.

Am I missing the point here, games in my experience don't randomly Octuple themselves into infinity.
This is definitely a serious problem, i don't have sdl installed at the moment, but the sample you provided doesn't show any issues with your code, their may be a leak from sdl itself, i'll try installing and replicating the issue myself later.

Just to be sure though, does the growth ever stabilize?
Check out https://www.facebook.com/LiquidGames for some great games made by me on the Playstation Mobile market.

No it just keeps on going, like I said it's exponential.

I reinstalled Windows 7 in between as I got a new HDD, so this is unlikely to be a corrupted install of windows. The same happened before and after.

If you get near a point, make it!
Advertisement

No it just keeps on going, like I said it's exponential.


You also said it's 4Kbytes/s, which is linear, not exponential.

4KB/sec = 240KB/minute

Which would give ~1.2MB in 5-10 minutes, not 160MB as you're seeing.

Could you double check what you're seeing?

I don't see anything immediately wrong with your code, but, as others have said as well, I wouldn't rely on Windows Task Manager if you want accurate data*. Have you tried using any other memory tracker?

*Anecdotally, my Windows Task Manager is completely broken. It lists every single running application as using 0 CPU and memory.

Hello to all my stalkers.

4k a sec was a rough estimate as I wanted to get to the point without being anal about the irrelevant bits.

It's average at the start fluctuates and goes up and down all the time, but as stated it seems to be exponential from the values.

p.s.

As quoted above 4k a sec is not exponential and it was a bad description, apologies.

If you get near a point, make it!

Is it actually going to continue consuming more and more memory until the system runs out of RAM and other programs are starved of memory? Because it doesnt really matter if its using RAM nobody else needs... (that could just be the OS being lazy)

o3o

This topic is closed to new replies.

Advertisement