Bug 1365194 - Remove parts of the hacks for memalign in mozjemalloc. r?njn draft
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 16 May 2017 20:01:55 +0900
changeset 579110 7a63d0462bac448c8989695765fb1aa615d7f056
parent 579109 0f622e48d693df535e7848e0ab2e749853895952
child 579111 b2f68507cd0476243a527ad50de021222d451811
child 579112 cd516821cb0050df1df9702ccb8e70ce64d84aa7
push id59148
push userbmo:mh+mozilla@glandium.org
push dateWed, 17 May 2017 00:43:10 +0000
reviewersnjn
bugs1365194
milestone55.0a1
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.
memory/mozjemalloc/jemalloc.c
--- 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