diff options
Diffstat (limited to 'Source/WebCore/manual-tests/memory/string-growth.html')
-rw-r--r-- | Source/WebCore/manual-tests/memory/string-growth.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/WebCore/manual-tests/memory/string-growth.html b/Source/WebCore/manual-tests/memory/string-growth.html new file mode 100644 index 0000000..2f921d0 --- /dev/null +++ b/Source/WebCore/manual-tests/memory/string-growth.html @@ -0,0 +1,16 @@ +<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> |