diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-03-13 11:14:54 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-03-13 11:14:54 +0900 |
| commit | aa1df29860047c73d93c40ec850c3953d8d3c37b (patch) | |
| tree | c52e10ece76c8dad477a1c4a4cd4815d61e897e8 /src/Execution/Allocator.php | |
| parent | 6ab8cb690303177200dc59550da972b36e7cfd18 (diff) | |
| download | php-waddiwasi-aa1df29860047c73d93c40ec850c3953d8d3c37b.tar.gz php-waddiwasi-aa1df29860047c73d93c40ec850c3953d8d3c37b.tar.zst php-waddiwasi-aa1df29860047c73d93c40ec850c3953d8d3c37b.zip | |
perf: change structure of MemInst to array of strings
Diffstat (limited to 'src/Execution/Allocator.php')
| -rw-r--r-- | src/Execution/Allocator.php | 6 |
1 files changed, 1 insertions, 5 deletions
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); } |
