Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
OCaml troll on Slashdot
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-03-17 (19:06)
From: Marcin 'Qrczak' Kowalczyk <qrczak@k...>
Subject: Re: [Caml-list] OCaml troll on Slashdot
Jason Hickey <> writes:

> In general, the implementation needs to add a check during assignment:
> "if the value being modified belongs to a strictly older generation
> than the value being stored, then mark it."
> In the implementation of using set_cdr! it should be possible
> to eliminate the check.  The cons-cell was just allocated, so it
> should belong to the minor heap.

No, the next cell was allocated afterwards, and it may have triggered GC
in the meantime.

When you allocate a sufficiently large number of cons cells in ascending
order, a GC during that operation will cause some link to be old to young.

   __("<         Marcin Kowalczyk