aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Execution/Allocator.php
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-03-13 11:14:54 +0900
committernsfisis <nsfisis@gmail.com>2024-03-13 11:14:54 +0900
commitaa1df29860047c73d93c40ec850c3953d8d3c37b (patch)
treec52e10ece76c8dad477a1c4a4cd4815d61e897e8 /src/Execution/Allocator.php
parent6ab8cb690303177200dc59550da972b36e7cfd18 (diff)
downloadphp-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.php6
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);
}