mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-19 18:01:31 +00:00
Progress and a tiny WASM binary parser
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user