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

2010-08-19 Thread spinoza1111
On Aug 18, 1:44 am, James Kanze james.ka...@gmail.com wrote: On Aug 17, 6:21 pm, Standish P stnd...@gmail.com wrote: Garbage collection doesn't use a stack. It uses a heap, which is in the abstract a collection of memory blocks of different lengths, divided into two lists, generally

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

2010-08-18 Thread spinoza1111
On Aug 18, 1:21 am, Standish P stnd...@gmail.com wrote: Garbage collection doesn't use a stack. It uses a heap, which is in the abstract a collection of memory blocks of different lengths, divided into two lists, generally represented as linked lists: 1.  A list of blocks that are free

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

2010-08-16 Thread spinoza1111
On Aug 16, 3:20 pm, Standish P stnd...@gmail.com wrote: [Q] How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ? Because a stack has push and pop, it is able to release and allocate memory. We envisage an exogenous stack which has malloc() associated with

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

2010-08-16 Thread spinoza1111
On Aug 16, 7:20 pm, Malcolm McLean malcolm.mcle...@btinternet.com wrote: On Aug 16, 10:20 am, Standish P stnd...@gmail.com wrote: [Q] How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ? Most programs can be written so that most of their memory