-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
mmap
for implicit memory bounds checks (#68)
Implements #38 for memory (but not tables). Also cleans up a lot of spaghetti code for division, which I rewrote when debugging. This PR enables implicit memory bounds checks by using mmap instead of malloc for linear memory. The key idea is to rely on hardware protection, as described in the original WASM paper, instead of explicit checks (although these can be re-enabled via the --explicit-bounds-checks flag. Doing so yields significant speedups -- we are on par with (and sometimes beat!) V8 in the benchmarks I've tried.
- Loading branch information
Showing
8 changed files
with
308 additions
and
140 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.