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

use new napi functions to allocate returned memory #258

Open
julianhille opened this issue Jan 24, 2023 · 0 comments
Open

use new napi functions to allocate returned memory #258

julianhille opened this issue Jan 24, 2023 · 0 comments

Comments

@julianhille
Copy link
Owner

julianhille commented Jan 24, 2023

According to this blog electron 21 has introduced
caged memory and native modules need refactoring to continue using ArrayBuffers and other off heap memory.
Actually muhammara might or might not run in electron > 21 as it just crashes when pointers / memory is not sandboxed.

We need to find a way to be backwards compatible to node and to older electron versions.

how to:
https://www.electronjs.org/blog/v8-memory-cage#i-want-to-refactor-a-node-native-module-to-support-electron-21-how-do-i-do-that

References:
https://www.electronjs.org/de/blog/electron-21-0#v8-memory-cage-enabled
https://www.electronjs.org/blog/v8-memory-cage
https://docs.google.com/document/d/1HSap8-J3HcrZvT7-5NsbYWcjfc0BVoops5TDHZNsnko/edit

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

1 participant