There's an easier way. Define JS_USE_CUSTOM_ALLOCATOR and then you can provide your own definitions of js_malloc et al, which must be in a file called jscustomallocator.h.
Nick On Mon, Jan 2, 2017 at 10:17 PM, <mskal...@redhat.com> wrote: > Hello, > is it a bad idea to declare js_malloc, js_calloc, js_realloc, js_free and > js_strdup in js/public/Utility.h as weak symbols ("__attribute__((weak))")? > > This would allow to use own allocator functions during SpiderMonkey > library link time. > > I know that weak symbols are not in C standard so it is not good for > portability. Mainly I want to know if there could be some functional > problems? And if SpiderMonkey maintainers are against this way of > cuntomization? > > Thanks for responses, > Marek > _______________________________________________ > dev-tech-js-engine-internals mailing list > dev-tech-js-engine-internals@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals > _______________________________________________ dev-tech-js-engine-internals mailing list dev-tech-js-engine-internals@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals