A little update, I ran the program disabling all calls to hxRender's blitting functions, as well as image loading and any other function besides window creation and updating.
I also tried to make sure that all of the destructors were properly called. They were. I printed out the address to a file when the destructor was called. Everything looks up to par.
And it was still doing it. I am starting to think that there might be a critical flaw in the way SDL handles OpenGL. Even with all the blitting turned off, and only creating 2 surfaces, the memory usage was incremental.
And does anybody know why minimizing a program, then restoring it reduces the ram needed?
I dunno, perhaps it is my library still somehow. The source code is available from the link below if anybody wants to try it for them selves.
Please try my demo
Quote:Original post by PnP Bios
And does anybody know why minimizing a program, then restoring it reduces the ram needed?
I once had the same experience when I used a tray icon. Once the app was started it took a lot of mem (even when started in try mode). After manually bringing it to the sceen and minimizing it again, it took only 1/3 of the mem... wtf?
Otherwise nice demo. No crash for me. But I would also be interested in the mem/minimize-problem..
First I thought the mem would probably move into the virtual mem but that doesn't change.
First it's
13,604 KB physical / 337,944 KB virtual
after minimizing and bringing back up it's
3,176 KB physical / 337,944 KB virtual
I think minimising application is not the case. All programs show the same pattern. And I don't think SDL has anything to do with it, I am working on my project now with sdl , and sdl works pretty good on most cases.
The memory increasing 4kb every 30 seconds or so isn't that big of a problem. You would have to be gaming for up to 4 hours on end to notice any difference at all.
In the end, I don't think it's that huge of a problem, and I am not entirely convinced that my code is at fault here. I have reviewed the source of my library, and I can't find any leaks. Even without blitting, it even incriments the ammount of ram used. Even when I turn off the screen sampling, it still does this.
For the majority of people who have tried it, it worked. If it crashed out on you in the first hour of trying it, please try it again. It did this the first time around because there was an actual leak. I plugged that, so you may experience tiny incremental memory use, but that wasn't what you experienced the first time around.
Again, my library code is available for review. The link is in my sig.
In the end, I don't think it's that huge of a problem, and I am not entirely convinced that my code is at fault here. I have reviewed the source of my library, and I can't find any leaks. Even without blitting, it even incriments the ammount of ram used. Even when I turn off the screen sampling, it still does this.
For the majority of people who have tried it, it worked. If it crashed out on you in the first hour of trying it, please try it again. It did this the first time around because there was an actual leak. I plugged that, so you may experience tiny incremental memory use, but that wasn't what you experienced the first time around.
Again, my library code is available for review. The link is in my sig.
I like it. If you ever move on to bigger, better graphics libraries, you can do that stuff in hardware with pixel shaders and it looks uber cool.
Can you add a framerate indicator to it?
Can you add a framerate indicator to it?
Glat, ratings ++ my friend.
For all those interested, the code glat provided was rather usefull. But no matter what, I could not get it to produce memory leaks. Just to make sure it was working at all, I forced one into the program, and it was caught. So, i'm prety sure my code is not at fault here.
I even went so far to create a new project, include all my library files as source, and rebuilt it using the memory manager to make double sure. Still, no leaks.
So, I don't know what else to say.
For all those interested, the code glat provided was rather usefull. But no matter what, I could not get it to produce memory leaks. Just to make sure it was working at all, I forced one into the program, and it was caught. So, i'm prety sure my code is not at fault here.
I even went so far to create a new project, include all my library files as source, and rebuilt it using the memory manager to make double sure. Still, no leaks.
So, I don't know what else to say.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement