Last active
November 5, 2015 04:50
-
-
Save vicapow/ee9f5f8180b39b438072 to your computer and use it in GitHub Desktop.
Was I really just able to allocate 56GB of memory in Google chrome?
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
var x = []; | |
for (var i = 0; i < 56; i++) { | |
x.push(new Uint8Array(1024 * 1024 * 1024)); | |
} | |
console.log(x.length); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here, I allocate 50GB, assign each byte a random value
[0, 256)
and accumulate the result. One downside, as far as I can tell, you can't allocate a single TypedArray larger than 1GB.This took ~23min to run but didn't crash!