[gambit-list] Fix garbage collector bug on 64 bit systems
Bradley Lucier
lucier at math.purdue.edu
Mon Dec 6 09:19:16 EST 2010
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.
Brad
More information about the Gambit-list
mailing list