Updates:
Status: PendingFurtherInfo
Comment #1 on issue 1938 by [email protected]: Cannot allocate more than
1.1GB of memory on heap
http://code.google.com/p/v8/issues/detail?id=1938
Verify that you are using x64 build of V8. 2048 is too big for ia32 build.
Try --max-old-space-size=2000 instead if you are using ia32.
Also your test takes really long time to allocate that many objects. It
spends all it's time copying huge queue again and again. Keep in mind that
arrays are not the best data structure to implement queue despite the fact
that they have shift and push methods. In general you should expect O(n)
complexity for both operations (though V8 tries to reduce it sometimes).
I recommend trying something like:
var queue = [];
var seq = [];
function mkBlock () {
var a = new Array(1000);
for(var i = 0; i < a.length; i++) a[i] = {'number':i,'string':"str"+i};
return a;
}
while (true) {
if (queue.length >= 10000) {
seq.push(queue);
queue = [];
print("100000000 objects created");
}
queue.push(mkBlock());
}
if you want to stress test size of the heap.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev