[Gc] Small patch to allow initial and maximum heap sizes to be >2GB.

Talbot, George Gtalbot at locuspharma.com
Thu May 28 11:29:11 PDT 2009


Small bug.  If you want to set initial heap/max heap size >2GB, then atoi() and atol() overflow.  Here's a small patch that fixes this in misc.c

George T. Talbot
gtalbot at locuspharma.com

gtalbot at germanium$ cvs diff misc.c

Index: misc.c
RCS file: /cvsroot/bdwgc/bdwgc/misc.c,v
retrieving revision 1.25
diff -r1.25 misc.c
<         initial_heap_sz = atoi(sz_str);
>         initial_heap_sz = atoll(sz_str);
<         word max_heap_sz = (word)atol(sz_str);
>         word max_heap_sz = (word)atoll(sz_str);

More information about the Gc mailing list