mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1365194 - Remove MOZ_JEMALLOC_API from _malloc_options and _malloc_message. r=njn
MOZ_JEMALLOC_API makes those symbols exported, but we're going to make MOZ_JEMALLOC_API include `extern "C"`, which GCC warns about in this case (can't use extern on a variable that is initialized). While we could get around this in some way, there is not much use for those variables being exported altogether: the only reason they are is to allow an override when linking mozjemalloc into executables, but doing that in Firefox requires patching the build system or passing some specific LDFLAGS. People who really need to do that might as well apply a patch. They also allow run-time override through LD_PRELOAD, but one might as well use the MALLOC_OPTIONS environment variable for _malloc_options. As for _malloc_message, it doesn't seem very useful to override, and probably noone ever overrode it at runtime. Note, we may want to remove them in a followup. --HG-- extra : rebase_source : f2dbe5dbf0bbdb369cd7c6255f624f16b8e37209
This commit is contained in:
parent
bbdb5a1a9c
commit
966b5bb639
@ -1077,7 +1077,6 @@ static __thread arena_t *arenas_map;
|
||||
/*
|
||||
* Runtime configuration options.
|
||||
*/
|
||||
MOZ_JEMALLOC_API
|
||||
const char *_malloc_options = MOZ_MALLOC_OPTIONS;
|
||||
|
||||
#ifndef MALLOC_PRODUCTION
|
||||
@ -1274,7 +1273,6 @@ wrtmessage(const char *p1, const char *p2, const char *p3, const char *p4)
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_JEMALLOC_API
|
||||
void (*_malloc_message)(const char *p1, const char *p2, const char *p3,
|
||||
const char *p4) = wrtmessage;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user