From aa1df29860047c73d93c40ec850c3953d8d3c37b Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 13 Mar 2024 11:14:54 +0900 Subject: perf: change structure of MemInst to array of strings --- src/Execution/Allocator.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/Execution/Allocator.php') diff --git a/src/Execution/Allocator.php b/src/Execution/Allocator.php index 8012078..23d9a06 100644 --- a/src/Execution/Allocator.php +++ b/src/Execution/Allocator.php @@ -129,11 +129,7 @@ final readonly class Allocator private function allocMem(MemType $memType): MemAddr { - $minSize = $memType->limits->min; - // @todo hack - $minSize *= 8; - $data = array_fill(0, $minSize * 64 * 1024, 0); - $memInst = new MemInst($memType, $data); + $memInst = new MemInst($memType); $this->store->mems[] = $memInst; return new MemAddr(count($this->store->mems) - 1); } -- cgit v1.2.3-70-g09d2