From:  mskalick@redhat.com
Date:  02 Jan 2017 19:50:14 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:  90.178.183.142

But this have to be defined during build time of SpiderMonkey library. Or am I wrong and this can be used also during linking? (in application using SpiderMonkey I can define/not-define JS_USE_CUSTOM_ALLOCATOR and decide what allocator functions to use?)

With weak symbols it would be possible to have one library. By default applications using it would use standard Mozilla allocator. But application developers could provide object file with for example definition of js_malloc during application compile time and change the behaviour).
A benefit of this is that applications which want to use custom allocator do not have to compile SpiderMonkey on their own and bundle it.