diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-12-30 12:49:24 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-12-30 12:49:43 -0800 |
commit | b500e12963793d7c297f9738637200d42baeb69c (patch) | |
tree | 18e15e2e4ee75709e1b87d80900923ee7353745c /src/library.js | |
parent | a16fb0dcb7dc001646ffd792e47bfa46c875d0a1 (diff) |
fix mmap; fixes #769
Diffstat (limited to 'src/library.js')
-rw-r--r-- | src/library.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library.js b/src/library.js index ad221d24..0b59b404 100644 --- a/src/library.js +++ b/src/library.js @@ -3563,9 +3563,9 @@ LibraryManager.library = { if (ptr % PAGE_SIZE != 0) { var old = ptr; ptr = _malloc(num + PAGE_SIZE); - _memcpy(ptr, old, num); - _free(old); ret = alignMemoryPage(ptr); + _memcpy(ret, old, num); + _free(old); } if (stream == -1) { _memset(ret, 0, num); |