Comment by 9d

Comment by 9d 7 days ago

3 replies

Why not just give apps chunks of non-contiguous memory and let them deal with that fact? Then like realloc, the memory they need stretched may just be moved first.

int_19h 7 days ago

Because wasm virtual machine has contiguous linear memory. So if you do this, you're no longer running wasm.

Besides, why would you design around the lack of a MMU? Even in embedded space it's often there.

  • 9d 7 days ago

    No I mean what if we updated the wasm spec to allow it?

    • int_19h 6 days ago

      But why would we do that when the hardware already has everything that's needed to present the app with a flat contiguous memory space? Why push unnecessary complexity at every single wasm app out there?