From 25779d371c571e4f51792af3e3c5588b3186e934 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Sat, 30 Mar 2019 19:10:17 +0100 Subject: Issue #187: Remove solaris conditional code. --- memory/mozjemalloc/jemalloc.c | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) (limited to 'memory/mozjemalloc/jemalloc.c') 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 -#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 #include -#if !defined(MOZ_MEMORY_SOLARIS) && !defined(MOZ_MEMORY_ANDROID) +#if !defined(MOZ_MEMORY_ANDROID) #include #endif #include @@ -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 -- cgit v1.2.3