Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Experimental shared memory support #241

Closed
nidin opened this issue Sep 5, 2018 · 5 comments
Closed

[DRAFT] Experimental shared memory support #241

nidin opened this issue Sep 5, 2018 · 5 comments

Comments

@nidin
Copy link
Contributor

nidin commented Sep 5, 2018

Introduction

Worker based multi threading and shard memory already available in chrome canary. I managed to test it with minimal changes in binaryen and assembly script. We could add an experimental support to assembly script by allowing user to define main memory as shared and share memory between workers.

Requirements

  • Atomic shared memory allocator (stack details must be saved in shared memory itself).
  • Compiler option to enable and accept imported memory as shared memory.
@dcodeIO
Copy link
Member

dcodeIO commented Sep 5, 2018

Sounds good! Could just be compiler flag --sharedMemory for now that tells asc to make the main memory shared. Once we have that, we can take a look at allocators. Might be useful to have atomic ops for locking and/or a distinction between a global and a thread-local allocator.

@nidin
Copy link
Contributor Author

nidin commented Sep 5, 2018

I will work on it. Need to check if binaryen already have atomic operations support. If not it need to be added first in binaryen.

@MaxGraey
Copy link
Member

MaxGraey commented Sep 5, 2018

@nidin Can confirm, binaryen support atomics and binaryen.js api.

@nidin
Copy link
Contributor Author

nidin commented Sep 5, 2018

@MaxGraey Perfect. I am on it.

@dcodeIO
Copy link
Member

dcodeIO commented Feb 7, 2019

Closing in favor of the related PRs :)

@dcodeIO dcodeIO closed this as completed Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants