Bug 1365194 - Remove parts of the hacks for memalign in mozjemalloc. r?njn
The hack dates back from the originally imported jemalloc code, which
couldn't assume it's built for Firefox. Now, we can assume that, which
means the code is always built with hidden visibility by default,
removing the need for the explicit hidden visibility.
Correspondingly, when building on Solaris with GCC, the default
visibility should also prevent the inlining, making the noinline
attribute redundant. And the Sun Studio path is useless since the
compiler is not supported anymore.
--- a/memory/mozjemalloc/jemalloc.c
+++ b/memory/mozjemalloc/jemalloc.c
@@ -5155,30 +5155,16 @@ RETURN:
* For more information on this technique, see section 2.2.7 (Avoid Using
* Exported Symbols) in http://www.akkadia.org/drepper/dsohowto.pdf.
*/
#ifndef MOZ_REPLACE_MALLOC
#if defined(__GNUC__) && !defined(MOZ_MEMORY_DARWIN)
#define MOZ_MEMORY_ELF
#endif
-
-#ifdef MOZ_MEMORY_SOLARIS
-# ifdef __SUNPRO_C
-void *
-memalign_impl(size_t alignment, size_t size);
-#pragma no_inline(memalign_impl)
-# elif (defined(__GNUC__))
-__attribute__((noinline))
-# endif
-#else
-#if (defined(MOZ_MEMORY_ELF))
-__attribute__((visibility ("hidden")))
-#endif
-#endif
#endif /* MOZ_REPLACE_MALLOC */
#ifdef MOZ_MEMORY_ELF
#define MEMALIGN memalign_internal
#else
#define MEMALIGN memalign_impl
#endif