swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Seg fault after 2 days of simulation


From: Marcus G. Daniels
Subject: Re: Seg fault after 2 days of simulation
Date: 13 Oct 1999 08:25:04 -0700
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "JK" == Jan Kreft <address@hidden> writes:

JK> BTW, would be better as an array of BOOL instead of char, does
JK> anyone know if that's possible?

You'd have to use bit shift operations and masking to do that, e.g.
"value |= (1 << offset)", "value &= ~(1 << offset)".  It's usually not
worth it unless the sequences are really big.  If the sequences have
*known* top-end size, you can allocate an ivar of sequence-size / 8 or
use the ": size" bitfield syntax. 

Btw, I really want to get away from use of raw memory in Swarm.  These
nasty consequences to unexpected allocation requirements are way too
nasty.  Even with a lot of experience and good tools, debugging memory
corruption problems can be a big time sink that ends up teaching you
nothing (except the benefits of obsessive behavior).  This bug
wouldn't have occurred if you were using the Java layer, because you'd
have used automatically sized and garbage collected Strings.

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]