diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-02-29 18:57:17 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-02-29 18:57:17 -0800 |
commit | 52a42c189ac1add9e2c6912b99b8a5b37e5a2c93 (patch) | |
tree | b6a85c046e729c7230bb3583a02dc596a97390a0 /src | |
parent | 5c0f26d60d432795ef4810b37cd6787b4bf1bdef (diff) |
optimize alignMemoryPage
Diffstat (limited to 'src')
-rw-r--r-- | src/preamble.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/preamble.js b/src/preamble.js index 45d2f4b2..98d12a43 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -583,7 +583,7 @@ var FUNCTION_TABLE; // XXX: In theory the indexes here can be equal to pointers var PAGE_SIZE = 4096; function alignMemoryPage(x) { - return Math.ceil(x/PAGE_SIZE)*PAGE_SIZE; + return ((x+4095)>>12)<<12; } var HEAP; |