mozilla-spidermonkey / spidermonkey-embedding-examples

Documentation and examples for embedding the SpiderMonkey JavaScript / WebAssembly engine in their applications.
Other
197 stars 34 forks source link

Example / docs for shared library build #11

Closed tynopex closed 5 years ago

tynopex commented 6 years ago

A constant source of pain for embedders is trying to do the seemingly reasonable task of using the mozjs shared library in a project. They often leads to cryptic link and runtime errors when memory is allocated on jemalloc and freed on system allocator (or vice-versa).

The simplest workaround for many is to --disable-jemalloc. This probably space should be better documented and maybe there are things that can be fixed upstream.

tynopex commented 6 years ago

Maybe note https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Build_Documentation