How to detect memory leaks ?
-
- Posts: 87
- Joined: Thu Oct 01, 2009 8:43 pm
How to detect memory leaks ?
Hi there,
I've set up my own GU homebrew. I tried to clear all instances I've initiated. However, sometimes the PSP crashes where I guess the root cause may be memory leaks. Is there a possability to detect memory leaks ? I'm using minpsp and eclipse as development environment.
Thanks for any hints...
Regards
I've set up my own GU homebrew. I tried to clear all instances I've initiated. However, sometimes the PSP crashes where I guess the root cause may be memory leaks. Is there a possability to detect memory leaks ? I'm using minpsp and eclipse as development environment.
Thanks for any hints...
Regards
Memory leaks do not cause program crashes, unless your program comes to the point where it trys to allocate more memory which then fails and your program not handling that case properly.
If you are really concerned about memory leaks, a debug memory manager will help you detect those. One can be found on my devblog, which is an C-Version of the C++ memory manager by Paul Nettle.
Other than that, we cannot help you with your problem, as we don't have enough information.
If you are really concerned about memory leaks, a debug memory manager will help you detect those. One can be found on my devblog, which is an C-Version of the C++ memory manager by Paul Nettle.
Other than that, we cannot help you with your problem, as we don't have enough information.
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
Alexander Berl
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
Alexander Berl
You can also use mmgr to look for memory leaks if you still believe that is the cause.
Code: Select all
.øOº'ºOø.
'ºOo.oOº'
-
- Posts: 87
- Joined: Thu Oct 01, 2009 8:43 pm
-
- Posts: 87
- Joined: Thu Oct 01, 2009 8:43 pm
Hi, thanks for that. I will try that out. I'm running my apps on C++. Therefore I would try the original as well ;o)Raphael wrote:Memory leaks do not cause program crashes, unless your program comes to the point where it trys to allocate more memory which then fails and your program not handling that case properly.
If you are really concerned about memory leaks, a debug memory manager will help you detect those. One can be found on my devblog, which is an C-Version of the C++ memory manager by Paul Nettle.
Other than that, we cannot help you with your problem, as we don't have enough information.
I'm pretty sure that the reason are memory leaks or in some circumstences wrong calculated needed memory.
Thanks.
It's cool you do not have to listen to me or Raph. We both answered this question.
Code: Select all
.øOº'ºOø.
'ºOo.oOº'
It has a few functions. But it basically can log every malloc/calloc and it can also catch memory leaks by watching the pointers handed out via these functions. I have not used it in a while, but I think you could alter some of the code,if it doesn't already have callback support, to cause a callback situation to form a sort of error handler to maybe go back and fix the problem, or reallocate the variable with more data.
Code: Select all
.øOº'ºOø.
'ºOo.oOº'