Hi Joe, To be honest I don't remember the exact rationale anymore. I think I made it this way so that the size of the largest possible object doesn't cause integer overflow in certain calculations in the GC.
An array with 128 million elements would use 512 Mb of memory, which is close to the limit with a copying collector, however for byte arrays, it would only be 128 Mb in size and that's too small. Allowing the size of an array to be a bignum would cause problems but I could probably get max-array-capacity to equal most-positive-fixnum. This would give you 1 Gb arrays and 256 Mb byte-arrays. I also plan on getting rid of copying GC at some point, which will effectively double the maximum heap size. Of course none of this is an issue on 64-bit platforms. Slava On Sun, Sep 7, 2008 at 8:28 PM, Joe Groff <[EMAIL PROTECTED]> wrote: > Hi guys. I was curious as to what the technical reasons for the 128M > limit on array size were. It doesn't correspond to most-positive- > fixnum (which is 256M-1), and looking at the VM, the array's size slot > is a standard CELL and could conceivably hold a bignum (if that > doesn't cause any snake-eating-its-tail dependencies). I've noticed > that Factor likes to run out of memory when there are a couple 128M > byte-arrays active in memory (I'm guessing when the GC tries to copy > anywhere near 1GB of coarse-sized objects, it hits the 2GB wall pretty > quick)--is it purely to keep the GC from fritzing out? > > -Joe > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Factor-talk mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/factor-talk > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
