Re: The joy of garbage collection



In article <1128008720.683586.58350@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
robbie.carlton@xxxxxxxxx <robbie.carlton@xxxxxxxxx> wrote:
...
>Does the program have to maintain a list of free
>memory somewhere,

Yes.

>and if so, how?

SIOD does it with a linked list of cells on the heap.

allocate = remove a cell from the freelist, set its type tag appropriately

mark = traverse the heap, setting a mark bit

sweep = scan the heap. Every unmarked cell that has a type tag
other than TC_FREE_CELL needs to be added to the free list and
have its type tag set to TC_FREE_CELL.

The heap itself is an array or arrays of a C union.

There are a number of significant downsides to the approach, but its
simple to read/maintain.

-Mike
--
http://www.mschaef.com
.



Relevant Pages

  • RE: User List Box - List from Hidden range - VBA worng
    ... In your for loop, ... range is only 1 column wide this will be a single cell). ... Basic Editor type the word on it's own in lower case on a line and hit enter. ... in the array reference - and an array starts with element 0. ...
    (microsoft.public.excel.programming)
  • Re: Wrong data type returned from user-defined function
    ... If you want it to function as an array function then it needs to be ... Dim strFormula As String ... UnRound = CVErr ... would execute just as if I'd typed it in the cell myself. ...
    (microsoft.public.excel.programming)
  • RE: User List Box - List from Hidden range - VBA worng
    ... In your for loop, ... range is only 1 column wide this will be a single cell). ... Basic Editor type the word on it's own in lower case on a line and hit enter. ... in the array reference - and an array starts with element 0. ...
    (microsoft.public.excel.programming)
  • Re: Help with Totals Please
    ... In Cell AB3, the Total of 0 Matches, the Formula would be ... Re: Help with Totals Please ... Just turn on your macro recorder, ... look at the Help reference "About array formulas and how to enter them". ...
    (microsoft.public.excel.programming)
  • Re: Formula help
    ... Roger Govier ... These are mutually exclusive however for each cell within the range. ... Create an array of Ottawa and Toronto, ...
    (microsoft.public.excel.misc)