Skip to content

Commit e92d362

Browse files
committed
fix: addMemory does not support 65536pages
1 parent 688746a commit e92d362

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

std/assembly/rt/tlsf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ function prepareBlock(root: Root, block: Block, size: usize): void {
374374

375375
/** Adds more memory to the pool. */
376376
function addMemory(root: Root, start: usize, end: usize): bool {
377-
if (DEBUG) assert(start <= end); // must be valid
377+
if (DEBUG) assert(start <= end || end == 0); // must be valid
378378
start = ((start + BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK) - BLOCK_OVERHEAD;
379379
end &= ~AL_MASK;
380380

0 commit comments

Comments
 (0)