Fog Creek Software
Discussion Board




Memory leak

You have a block of memory, say 4GB. Inside of it, there are 2 linked lists and the rest of memory is free. How can one be sure that there is no memory leak in the memory? Suppose you know that each of the element in either of the linked lists is 8MB.

robin
Sunday, June 29, 2003

Memory leaks are caused by programs, not data structures...

What are you talking about?

Peter Meilstrup
Monday, June 30, 2003

I guess what the author intends to point out here is, if the variable pointing to the allocated chunk of 4GB space is made to point to something else after creation of the 2 linked lists then if there is any space within that 4GB which is not accesible by any of the linked lists, it constitutes a memory leak.

Alex Czar
Monday, June 30, 2003

*  Recent Topics

*  Fog Creek Home