blob: 2f921d0141fb27e99a65390426f6717943af3757 [file] [log] [blame]
<script>
var x = "x";
for (var i = 1; i < 23; ++i) {
x = x + x;
}
// x should now be a 2^23 character string, which is 16M in size.
var y;
// now append to it repeatedly in a way that prevents buffer sharing
for (var i = 0; i < 1000; ++i) {
y = x + i;
}
</script>