I've got a blank cpp module (just empty main and no libraries are included)
compiled as a "main module":
em++ dummy.cc -o dummy.js -s MODULARIZE=1 -s INCLUDE_FULL_LIBRARY=0 -s
WASM=1 -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s TOTAL_MEMORY=1MB -s
TOTAL_STACK=128KB -std=c++11 -s MAIN_MODULE=1
This module is loaded by node
console.log(process.memoryUsage())
Module = require('./dummy');
Module({}).then((m) => {
console.log(process.memoryUsage())
});
Memory usage of node itself (as shown by activity monitor) is 7MB. With the
above module loaded it becomes almost 40MB. Is this expected? Is there any
way to decrease the amount of using memory?
Btw, the output is:
{ rss: 19574784,
heapTotal: 6062080,
heapUsed: 3663952,
external: 8272 }
{ rss: 47509504,
heapTotal: 19042304,
heapUsed: 15156120,
external: 3422273 }
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.