trying to fix wasm heap

This commit is contained in:
Steven Hugg 2018-07-10 22:17:39 -05:00
parent a8c1ead244
commit 613277f0e9
4 changed files with 12 additions and 2 deletions

View File

@ -44,6 +44,8 @@ TODO:
- base-36 encoding for LZG
- disassembler for uploaded ROMs
- show tool-specific (readonly) include files
- verilog debugging makes it slow
- fix VCS mame
WEB WORKER FORMAT

5
package-lock.json generated
View File

@ -253,6 +253,11 @@
"integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=",
"dev": true
},
"heapdump": {
"version": "0.3.9",
"resolved": "https://registry.npmjs.org/heapdump/-/heapdump-0.3.9.tgz",
"integrity": "sha1-A8dOsN9dZ74Jgug0KbqcnSs7f3g="
},
"hoek": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz",

View File

@ -4,6 +4,7 @@
"author": "Steven Hugg",
"dependencies": {},
"devDependencies": {
"heapdump": "^0.3.9",
"typescript": "^2.9.2",
"@types/jquery": "^2.x",
"@types/bootstrap": "^3.x",

View File

@ -2,6 +2,7 @@
var assert = require('assert');
var fs = require('fs');
var wtu = require('./workertestutils.js');
var heapdump = require('heapdump');
// TODO: why memory leak?
CACHE_WASM_MODULES = false;
@ -54,9 +55,10 @@ function doBuild(msgs, callback, outlen, nlines, nerrors) {
}
}
}
if (--msgcount == 0)
if (--msgcount == 0) {
callback(null, msg);
else
//heapdump.writeSnapshot();
} else
console.log(msgcount + ' msgs left');
};
global.onmessage({data:{reset:true}});