Please view the code below:

// d8 --expose-gc

for(var i = 0; i < 1000000; i++)
{
// allocation huge memory
var buffer = [];
buffer.length = 100000;
// assign to some native function's prototype
version.prototype[i] = buffer;
}
// clean the function to dereference the buffers
version = undefined;
// force gc
gc();

print("gc was done, but the memory footprint is still huge. why?");
// pause
for(;;);

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to