Linked by Thom Holwerda on Tue 12th Dec 2006 18:18 UTC, submitted by BlueVoodoo
General Unix Memory leaks can be tough and costly problems to solve, so it makes sense to use good tools to clearly point out and understand where the leaks are coming from. This article outlines an approach you can use while tackling memory leaks, and it discusses how to take advantage of the MALLOCDEBUG tool that is supplied with AIX.
Thread beginning with comment 191311
To read all comments associated with this story, please click here.
Use good tools
by Sodki on Tue 12th Dec 2006 20:46 UTC
Member since:

How about programming in a language that automates memory (de)allocation? There, no more memory leaks.

Reply Score: 1

RE: Use good tools
by pojo on Wed 13th Dec 2006 05:58 in reply to "Use good tools"
pojo Member since:

Actually, you can still have memory leaks even in languages that garbage collect or do reference counting. It's not hard to add an object to some collection and then forget about. The collection just grows and grows until you run out of memory. Granted, it's easier to find what is growing, because you can tell the JVM to dump it's heap into a file for inspection.

Also, languages that do GC have the downside of actually cleaning up their memory space when they start running out of space, which causes pauses and general slowness. And nobody likes that.

Reply Parent Score: 2

RE[2]: Use good tools
by Earl Colby pottinger on Wed 13th Dec 2006 06:16 in reply to "RE: Use good tools"
Earl Colby pottinger Member since:

When I use to program in BASIC I would call the FREE() function to force Garbage Collection when I wanted it done. Among other things if you called it often each FREE() took very little time to run.

Don't all languages that do GC allow you to force it early to control delays?

Reply Parent Score: 1