PSP Hacks - Forums

Go Back   PSP Hacks - Forums > PSP Community > PSP Programming & Development

Notices

Reply
 
Thread Tools Display Modes
  #41  
Old 09-24-2009, 06:37 AM
Brick Brick is offline
I am Flame Master
PSP Enthusiast
 

Join Date: Mar 2008
Location: *this
Posts: 466
Brick is on a distinguished road
Default

Quote:
Originally Posted by HyperHacker View Post
How do people recommend tracking down a slow memory leak? I don't think I can use Valgrind on a PSP app. No idea where it's leaking and it takes hours for it to actually crash.
Obviously , you allocate *something* *somewhere*(((im a genius :-P))) that never gets deleted.

There are 2 ways to solve this :
1) If you don't have to allocate buffers and your using C++ , just use STL.
2)If you have to do allocations/cleanups manually , then you need a memory tracker with the ability to dump every single entry to a log file or something.

The tracker must hold at least : 1) The data-pointer , 2) The size , 3) The source file , 4) The line of the current source file(just take a look at __FILE__,__LINE__ directives), and must know exactly how many blocks of memory are available, preventing memory allocations out-of-the-limit.

Suggestion before implementing this : Use linked lists to store this information. Don't use static array stacks or dynamic arrays.

Last edited by Brick; 09-24-2009 at 06:52 AM.
Reply With Quote
  #42  
Old 10-14-2009, 08:20 PM
Stinkee2's Avatar
Stinkee2 Stinkee2 is offline
Programmer
PSP Enthusiast
 

Join Date: Jul 2009
Location: int main()
Posts: 308
Stinkee2 is on a distinguished road
Default

jus noiced this but my tutorial for "How To Install MinPSPW with Code::Blocks IDE" is named "Stinkee2 - by Stinkee2" lol

was that an accident?
__________________
-----------------------------------------

The Real Brian Peppers (Told From Brother)

=D
By far my favorite quote ever:
"PM Oyabun a bunch of gay pr0n and you're in." - ...BeAkEr...
Other Funny Quotes:
Spoiler:

"Jesse, I need your supercapacitor!" - Ian Flournoy

"Fascism, pronounced fæʃɪzəm" - Wikipedia

Me: "Hang on, Im fertelizing the plant."
Dad: "My hand is gonna fertelize your ass in a minute!" - Dad (RIP)
Reply With Quote
Reply

 



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:23 AM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
©