diff options
Diffstat (limited to 'src/determinstic.js')
-rw-r--r-- | src/determinstic.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/determinstic.js b/src/determinstic.js index 91f98ed9..1ec0bbfe 100644 --- a/src/determinstic.js +++ b/src/determinstic.js @@ -10,3 +10,11 @@ Date.now = function() { }; performance.now = Date.now; +function hashMemory(id) { + var ret = 0; + for (var i = 0; i < HEAPU8.length; i++) { + ret = (ret*17 + HEAPU8[i])|0; + } + print(id + ':' + ret); +} + |