From:  Nicholas Nethercote <n.nethercote@gmail.com>
Date:  02 Jan 2017 19:35:45 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.tech.js-engine.internals
Subject:  

Re: Use weak symbols instead of JS_USE_CUSTOM_ALLOCATOR

NNTP-Posting-Host:  63.245.214.181

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,  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
>