Re: Comparing Pika-syle and JNI-style bear 14 Jan 2004 23:55 UTC


On Wed, 14 Jan 2004, Per Bothner wrote:

>Tom Lord wrote:
>
>> (b) it turns out that conservative GC is a sham in the sense that if
>> you use it without a deep understanding of permissable C optimizations
>> and eternal vigilance about what they might effect -- you're going to
>> lose by writing subtly incorrect code.
>
>Nah.  Theoretically possible, but I've never heard of it actually
>effecting real code.  Other compiler/OS bugs - or cosmic rays effecting
>your memory are much more likely to bite you.

I've been bitten by this while using a genetic algorithm.  I had
"random-looking" bit patterns (the genomes) filling almost 2Gbytes of
memory space, and the Boehm collector was mistaking almost half of
the words for possible pointers.  It eventually reached a tipping
point where the values it couldn't free contained enough
"pseudopointers" to prevent it from freeing anything else, and
crashed.

I switched to explicit memory management and the problem went away.

				Bear