[gambit-list] Fix garbage collector bug on 64 bit systems
Alan Post
alanpost at sunflowerriver.org
Mon Dec 6 10:58:13 EST 2010
On Mon, Dec 06, 2010 at 09:26:51AM -0500, Marc Feeley wrote:
>
> On 2010-12-06, at 9:19 AM, Bradley Lucier wrote:
>
> > Marc:
> >
> > In lib/mem.c you changed
> >
> > @@ -345,7 +345,7 @@ ___HIDDEN long words_prev_msections;
> >
> > /* words usable in msections */
> > #define WORDS_MOVABLE_USABLE \
> > -(2*the_msections->nb_sections*((___MSECTION_SIZE>>1)-___MSECTION_FUDGE+1))
> > +(2*the_msections->nb_sections*(long)((___MSECTION_SIZE>>1)-___MSECTION_FUDGE+1))
> >
> > Perhaps your intention was to ensure that some part of the computation
> > will be done in 64-bit arithmetic, but on 64-bit Windows I believe (but
> > am not sure) that (long) is 32-bits, and that you need (long long) to
> > get 64-bits.
> >
> > One should probably use a 64-bit type defined in gambit.h.
>
> I'll have to think about this one. The intent is to use the natural word size, but not bigger. If I use ___I64 then a 64 bit computation will be done on 32 bit machines, which is a waste. Perhaps I should just use ___WORD. Hmmmm...
>
Is that either 'size_t' (for arithmetic word size) or 'void*' (for
pointer word size)?
IIRC, these aren't always the same size, depending on architecture.
I also understand that I may be stating the obvious, here!
-Alan
--
.i ko djuno fi le do sevzi
More information about the Gambit-list
mailing list