summaryrefslogtreecommitdiffstats
path: root/memory
diff options
context:
space:
mode:
Diffstat (limited to 'memory')
-rw-r--r--memory/mozjemalloc/jemalloc.c27
-rw-r--r--memory/mozjemalloc/moz.build10
2 files changed, 6 insertions, 31 deletions
diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c
index c0c189abf..9a97bbb09 100644
--- a/memory/mozjemalloc/jemalloc.c
+++ b/memory/mozjemalloc/jemalloc.c
@@ -280,9 +280,7 @@ typedef long ssize_t;
#define JEMALLOC_RECYCLE
#ifndef MOZ_MEMORY_WINDOWS
-#ifndef MOZ_MEMORY_SOLARIS
#include <sys/cdefs.h>
-#endif
#ifndef __DECONST
# define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var))
#endif
@@ -308,7 +306,7 @@ __FBSDID("$FreeBSD: head/lib/libc/stdlib/malloc.c 180599 2008-07-18 19:35:44Z ja
#endif
#include <sys/time.h>
#include <sys/types.h>
-#if !defined(MOZ_MEMORY_SOLARIS) && !defined(MOZ_MEMORY_ANDROID)
+#if !defined(MOZ_MEMORY_ANDROID)
#include <sys/sysctl.h>
#endif
#include <sys/uio.h>
@@ -410,10 +408,6 @@ void *_mmap(void *addr, size_t length, int prot, int flags,
#endif
#endif
-#if defined(MOZ_MEMORY_SOLARIS) && defined(MAP_ALIGN) && !defined(JEMALLOC_NEVER_USES_MAP_ALIGN)
-#define JEMALLOC_USES_MAP_ALIGN /* Required on Solaris 10. Might improve performance elsewhere. */
-#endif
-
#ifndef __DECONST
#define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var))
#endif
@@ -1040,7 +1034,7 @@ static const bool config_recycle = false;
* will abort.
* Platform specific page size conditions copied from js/public/HeapAPI.h
*/
-#if (defined(SOLARIS) || defined(__FreeBSD__)) && \
+#if (defined(__FreeBSD__)) && \
(defined(__sparc) || defined(__sparcv9) || defined(__ia64))
#define pagesize_2pow ((size_t) 13)
#elif defined(__powerpc64__)
@@ -5126,13 +5120,6 @@ malloc_ncpus(void)
else
return (n);
}
-#elif (defined(MOZ_MEMORY_SOLARIS))
-
-static inline unsigned
-malloc_ncpus(void)
-{
- return sysconf(_SC_NPROCESSORS_ONLN);
-}
#elif (defined(MOZ_MEMORY_WINDOWS))
static inline unsigned
malloc_ncpus(void)
@@ -5929,19 +5916,9 @@ RETURN:
#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
diff --git a/memory/mozjemalloc/moz.build b/memory/mozjemalloc/moz.build
index feeb4fb07..6408aac8c 100644
--- a/memory/mozjemalloc/moz.build
+++ b/memory/mozjemalloc/moz.build
@@ -13,11 +13,6 @@ SOURCES += [
]
FINAL_LIBRARY = 'memory'
-# See bug 422055.
-if CONFIG['OS_ARCH'] == 'SunOS' and not CONFIG['GNU_CC'] \
- and CONFIG['MOZ_OPTIMIZE']:
- CFLAGS += ['-xO5']
-
# For non release/esr builds, enable (some) fatal jemalloc assertions. This
# helps us catch memory errors.
if CONFIG['MOZ_UPDATE_CHANNEL'] not in ('release', 'esr'):
@@ -37,7 +32,10 @@ LOCAL_INCLUDES += [
]
if CONFIG['GNU_CC']:
- CFLAGS += ['-Wno-unused'] # too many annoying warnings from mfbt/ headers
+ # too many annoying warnings from mfbt/ headers
+ # also too many false positives from functions generated through rb_wrab from rb.h.
+ CFLAGS += ['-Wno-unused',
+ '-Wno-uninitialized']
if CONFIG['_MSC_VER']:
CFLAGS += ['-wd4273'] # inconsistent dll linkage (bug 558163)