diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-23 00:26:22 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-02-23 00:26:22 -0500 |
commit | e9360fae1307575a255bb354efb807eb71e9369a (patch) | |
tree | 5fcaade08d40364eee06df289a4b9d9f8f712c4e /memory/mozjemalloc | |
parent | 2896724eaf851ee4b3d6f14eae05dcc626d88cdd (diff) | |
download | UXP-e9360fae1307575a255bb354efb807eb71e9369a.tar UXP-e9360fae1307575a255bb354efb807eb71e9369a.tar.gz UXP-e9360fae1307575a255bb354efb807eb71e9369a.tar.lz UXP-e9360fae1307575a255bb354efb807eb71e9369a.tar.xz UXP-e9360fae1307575a255bb354efb807eb71e9369a.zip |
Issue #1053 - Remove android support from memory
Diffstat (limited to 'memory/mozjemalloc')
-rw-r--r-- | memory/mozjemalloc/jemalloc.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c index ecc9d2985..50ba22889 100644 --- a/memory/mozjemalloc/jemalloc.c +++ b/memory/mozjemalloc/jemalloc.c @@ -100,11 +100,6 @@ ******************************************************************************* */ -#ifdef MOZ_MEMORY_ANDROID -#define NO_TLS -#define _pthread_self() pthread_self() -#endif - /* * On Linux, we use madvise(MADV_DONTNEED) to release memory back to the * operating system. If we release 1MB of live pages with MADV_DONTNEED, our @@ -174,7 +169,7 @@ # define MALLOC_SYSV #endif -#if defined(MOZ_MEMORY_LINUX) && !defined(MOZ_MEMORY_ANDROID) +#ifdef MOZ_MEMORY_LINUX #define _GNU_SOURCE /* For mremap(2). */ #endif @@ -498,7 +493,7 @@ static bool malloc_initialized = false; /* No init lock for Windows. */ #elif defined(MOZ_MEMORY_DARWIN) static malloc_mutex_t init_lock = {OS_SPINLOCK_INIT}; -#elif defined(MOZ_MEMORY_LINUX) && !defined(MOZ_MEMORY_ANDROID) +#elif defined(MOZ_MEMORY_LINUX) static malloc_mutex_t init_lock = PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP; #else static malloc_mutex_t init_lock = PTHREAD_MUTEX_INITIALIZER; @@ -1374,12 +1369,6 @@ void (*_malloc_message)(const char *p1, const char *p2, const char *p3, # define assert(e) #endif -#ifdef MOZ_MEMORY_ANDROID -// Android's pthread.h does not declare pthread_atfork() until SDK 21. -extern MOZ_EXPORT -int pthread_atfork(void (*)(void), void (*)(void), void(*)(void)); -#endif - #if defined(MOZ_JEMALLOC_HARD_ASSERTS) # define RELEASE_ASSERT(assertion) do { \ if (!(assertion)) { \ @@ -1404,7 +1393,7 @@ malloc_mutex_init(malloc_mutex_t *mutex) InitializeSRWLock(mutex); #elif defined(MOZ_MEMORY_DARWIN) mutex->lock = OS_SPINLOCK_INIT; -#elif defined(MOZ_MEMORY_LINUX) && !defined(MOZ_MEMORY_ANDROID) +#elif defined(MOZ_MEMORY_LINUX) pthread_mutexattr_t attr; if (pthread_mutexattr_init(&attr) != 0) return (true); @@ -1457,7 +1446,7 @@ malloc_spin_init(malloc_spinlock_t *lock) InitializeSRWLock(lock); #elif defined(MOZ_MEMORY_DARWIN) lock->lock = OS_SPINLOCK_INIT; -#elif defined(MOZ_MEMORY_LINUX) && !defined(MOZ_MEMORY_ANDROID) +#elif defined(MOZ_MEMORY_LINUX) pthread_mutexattr_t attr; if (pthread_mutexattr_init(&attr) != 0) return (true); |