I've been playing with the latest 1.8.1 source, and it appears that
something is wrong with the garbage collection threshold specified in
JS_NewRuntime(). Here's some quick example code:
for ( var i = 0 ; i < 1000 ; i++ )
{
print(i);
//gc();
obj = new Array();
for ( var j = 0 ; j < 100000 ; j++ )
obj[j] = "1234567890";
}
I'm using the latest source updated today (11/12/09) compiled in Linux, and
executed with the js shell. If I let this run to completion with 1.8.1 it
consumes around 1GB of memory, and the js shell should kick in at 64MB.
This same code run with release 1.7 runs as expected -- it jumps up to 64MB,
then cleans up after itself.
If I explicitly call gc() in the code above, then it seems to work fine in
1.8.1. (Consumes around 2MB of memory)
I apologize if there's already an open bug for this, I couldn't find
anything releated.
Thank you!
--Cal