Created
July 2, 2019 21:47
-
-
Save hotsphink/8037d5eac463cf748440f1f84efe6570 to your computer and use it in GitHub Desktop.
mkgist-created gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function makeExtensibleString() { | |
var s = "xxxxxxxx"; | |
var t = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // 31 characters | |
var r1 = t + s; | |
r1.match(/x/); | |
return r1; | |
} | |
function test() { | |
const s = makeExtensibleString(); | |
const r = s + (s + s); | |
// print(r); | |
dumpStringRepresentation(r); | |
print(" ----- minor GC -------"); | |
minorgc(); | |
r.match(/x/); | |
// print(r); | |
dumpStringRepresentation(r); | |
} | |
test(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment