aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Execution/Allocator.php
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-03-03 21:01:46 +0900
committernsfisis <nsfisis@gmail.com>2024-03-04 07:23:59 +0900
commit8b689c5ff077252a68c88bc7d70990405fc8dd5a (patch)
tree216bef1b2bd71892086a2961617bcdb7d22ea2b1 /src/Execution/Allocator.php
parent996259e6a1a04f91179d2b83cc19e3fbb371cd33 (diff)
downloadphp-waddiwasi-8b689c5ff077252a68c88bc7d70990405fc8dd5a.tar.gz
php-waddiwasi-8b689c5ff077252a68c88bc7d70990405fc8dd5a.tar.zst
php-waddiwasi-8b689c5ff077252a68c88bc7d70990405fc8dd5a.zip
feat: implement more instructions
Diffstat (limited to 'src/Execution/Allocator.php')
-rw-r--r--src/Execution/Allocator.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Execution/Allocator.php b/src/Execution/Allocator.php
index 89e1f83..8012078 100644
--- a/src/Execution/Allocator.php
+++ b/src/Execution/Allocator.php
@@ -130,6 +130,8 @@ 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);
$this->store->mems[] = $memInst;