mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-26 10:37:19 +03:00
Replace JEMALLOC_ATTR with various different macros when it makes sense
Theses newly added macros will be used to implement the equivalent under MSVC. Also, move the definitions to headers, where they make more sense, and for some, are even more useful there (e.g. malloc).
This commit is contained in:
parent
7cdea3973c
commit
da99e31105
8 changed files with 56 additions and 82 deletions
|
|
@ -32,7 +32,9 @@ malloc_tsd_no_cleanup(void *arg)
|
|||
}
|
||||
|
||||
#if defined(JEMALLOC_MALLOC_THREAD_CLEANUP) || defined(_WIN32)
|
||||
JEMALLOC_ATTR(visibility("default"))
|
||||
#ifndef _WIN32
|
||||
JEMALLOC_EXPORT
|
||||
#endif
|
||||
void
|
||||
_malloc_thread_cleanup(void)
|
||||
{
|
||||
|
|
@ -91,7 +93,7 @@ _tls_callback(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|||
return (true);
|
||||
}
|
||||
|
||||
JEMALLOC_ATTR(section(".CRT$XLY")) JEMALLOC_ATTR(used)
|
||||
JEMALLOC_SECTION(".CRT$XLY") JEMALLOC_ATTR(used)
|
||||
static const BOOL (WINAPI *tls_callback)(HINSTANCE hinstDLL,
|
||||
DWORD fdwReason, LPVOID lpvReserved) = _tls_callback;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue