News for hackers. Stuff that matters.
Re:Show HN: Life – A secure, blazing-fast, cross-platform We... by AYBABTME on Thursday August 02, 2018 @12:30PM (#17672804)
Can CPU and memory limits be enforced? If so, how is it done?
Re:Show HN: Life – A secure, blazing-fast, cross-platform We... by AgentME on Thursday August 02, 2018 @05:17PM (#17675560)
It looks like this Life VM has a "RunWithGasLimit" function that can run WebAssembly for a limited number of steps. I'm not sure if it pauses or aborts the VM when the limit is reached.

On a related note: you can enforce a CPU limit on WebAssembly in any engine by using wasm-metering[0]. Note that if the WebAssembly hits the limit, it is entirely aborted, not paused. So wasm-metering is good for limiting the CPU usage of a WebAssembly binary that has short functions called regularly, but not capable of time-slicing a long-running WebAssembly function. I think you'll need custom support from a WebAssembly VM (or a much more extensive preprocessor) for that.

[0] https://github.com/ewasm/wasm-metering

Re:Show HN: Life – A secure, blazing-fast, cross-platform We... by humblebee on Thursday August 02, 2018 @01:15PM (#17673311)
It supports both a `DefaultMemoryPages` size, as well as a `MaxMemoryPages` in the vmconfig[0]. Only the `DefaultMemoryPages` is set when running through the cli (value of 128 pages, with a page size of 64KB), and there appear to be no flags to configure it at the moment.

[0] https://github.com/perlin-network/life/blob/master/exec/vm.g...