1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:47:34 +00:00

LibWasm: Correct memory init size when instantiating

These limits are in units of page size, not bytes.
Also fixes incorrect debug logs.
This commit is contained in:
Ali Mohammad Pur 2021-05-17 21:41:07 +04:30 committed by Ali Mohammad Pur
parent 4fd43a8f96
commit 4a459d2430
3 changed files with 5 additions and 4 deletions

View file

@ -300,7 +300,7 @@ public:
explicit MemoryInstance(const MemoryType& type)
: m_type(type)
{
grow(m_type.limits().min());
grow(m_type.limits().min() * Constants::page_size);
}
auto& type() const { return m_type; }