Progress and a tiny WASM binary parser

This commit is contained in:
dcodeIO
2018-04-03 23:56:48 +02:00
parent 06198a3723
commit 5823e35f37
58 changed files with 12075 additions and 3964 deletions

View File

@ -347,7 +347,7 @@ export function allocate_memory(request: usize): usize {
* a hard-coded limit on the maximum allocation size because of the way this
* allocator works.
*/
if (request + HEADER_SIZE > MAX_ALLOC) {
if (request > MAX_ALLOC - HEADER_SIZE) {
return 0;
}