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:
Mike Hommey
2012-04-30 12:38:29 +02:00
committed by Jason Evans
parent 7cdea3973c
commit da99e31105
8 changed files with 56 additions and 82 deletions

View File

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