How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

Malcolm McLean malcolm.mclean5 at btinternet.com
Fri Aug 20 08:53:43 EDT 2010


On Aug 19, 2:14 pm, spinoza1111 <spinoza1... at yahoo.com> wrote:
> All the rest [how to implement heaps] is
> detail for the little techies to normally, get wrong.
>
That's a fundamental feature of structured programming.

If we maintain the interface malloc(), realloc(), and free(), then we
could have a fairly simple or a fairly complicated scheme, and the
user doesn't care or need to know.

The problem is that a lot of techniques we can use to speed up memory
management, such as allocating from a stack, can't be used with this
interface. Designing good interfaces is hard.




More information about the Python-list mailing list