mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-02 16:40:29 +03:00
Merge fe12022b68 into 1972241cd2
This commit is contained in:
commit
91ef5ee427
1 changed files with 32 additions and 0 deletions
|
|
@ -28,12 +28,31 @@
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* Data. */
|
/* Data. */
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define STR(s) #s
|
||||||
|
#define XSTR(s) STR(s)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Runtime configuration options. */
|
/* Runtime configuration options. */
|
||||||
|
#ifndef _MSC_VER
|
||||||
const char *je_malloc_conf
|
const char *je_malloc_conf
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
JEMALLOC_ATTR(weak)
|
JEMALLOC_ATTR(weak)
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
#else
|
||||||
|
extern const char *je_malloc_conf;
|
||||||
|
const char *malloc_conf_default = NULL;
|
||||||
|
#if defined (_M_IX86)
|
||||||
|
// NOTE: The JEMALLOC_PRIVATE_NAMESPACE does not get applied properly on 32-bit
|
||||||
|
// windows, presumably due to the leading underscore being automatically added
|
||||||
|
// to all symbols.
|
||||||
|
#pragma comment(linker, "/alternatename:_" XSTR(je_malloc_conf) "=_malloc_conf_default")
|
||||||
|
#else
|
||||||
|
#pragma comment(linker, "/alternatename:" XSTR(je_malloc_conf) "=" XSTR(JEMALLOC_PRIVATE_NAMESPACE) "malloc_conf_default")
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The usual rule is that the closer to runtime you are, the higher priority
|
* The usual rule is that the closer to runtime you are, the higher priority
|
||||||
* your configuration settings are (so the jemalloc config options get lower
|
* your configuration settings are (so the jemalloc config options get lower
|
||||||
|
|
@ -51,11 +70,24 @@ const char *je_malloc_conf
|
||||||
* We don't actually want this to be widespread, so we'll give it a silly name
|
* We don't actually want this to be widespread, so we'll give it a silly name
|
||||||
* and not mention it in headers or documentation.
|
* and not mention it in headers or documentation.
|
||||||
*/
|
*/
|
||||||
|
#ifndef _MSC_VER
|
||||||
const char *je_malloc_conf_2_conf_harder
|
const char *je_malloc_conf_2_conf_harder
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
JEMALLOC_ATTR(weak)
|
JEMALLOC_ATTR(weak)
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
#else
|
||||||
|
extern const char *je_malloc_conf_2_conf_harder;
|
||||||
|
const char *malloc_conf_2_conf_harder_default = NULL;
|
||||||
|
#if defined (_M_IX86)
|
||||||
|
// NOTE: The JEMALLOC_PRIVATE_NAMESPACE does not get applied properly on 32-bit
|
||||||
|
// windows, presumably due to the leading underscore being automatically added
|
||||||
|
// to all symbols.
|
||||||
|
#pragma comment(linker, "/alternatename:_" XSTR(je_malloc_conf_2_conf_harder) "=_malloc_conf_2_conf_harder_default")
|
||||||
|
#else
|
||||||
|
#pragma comment(linker, "/alternatename:" XSTR(je_malloc_conf_2_conf_harder) "=" XSTR(JEMALLOC_PRIVATE_NAMESPACE) "malloc_conf_2_conf_harder_default")
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *opt_malloc_conf_symlink = NULL;
|
const char *opt_malloc_conf_symlink = NULL;
|
||||||
const char *opt_malloc_conf_env_var = NULL;
|
const char *opt_malloc_conf_env_var = NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue