From e16bcd08aae85a7d9c2de5a4b1c733280cb81112 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Sun, 13 May 2018 00:08:52 +0200 Subject: Remove MOZ_WIDGET_GONK [2/2] Tag #288 --- memory/build/mozmemory_wrap.h | 2 +- memory/mozjemalloc/jemalloc.c | 5 ----- memory/volatile/tests/TestVolatileBuffer.cpp | 9 +-------- 3 files changed, 2 insertions(+), 14 deletions(-) (limited to 'memory') diff --git a/memory/build/mozmemory_wrap.h b/memory/build/mozmemory_wrap.h index 5d718e75ee..bb1d339bad 100644 --- a/memory/build/mozmemory_wrap.h +++ b/memory/build/mozmemory_wrap.h @@ -133,7 +133,7 @@ # endif # else # define MOZ_MEMORY_API MFBT_API -# if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK) +# if defined(MOZ_WIDGET_ANDROID) # define MOZ_WRAP_NEW_DELETE # endif # endif diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c index 7950b43e89..c0c189abf1 100644 --- a/memory/mozjemalloc/jemalloc.c +++ b/memory/mozjemalloc/jemalloc.c @@ -149,12 +149,7 @@ * the options passed via the MALLOC_OPTIONS environment variable but is * applied in addition to them. */ -#ifdef MOZ_WIDGET_GONK - /* Reduce the amount of unused dirty pages to 1MiB on B2G */ -# define MOZ_MALLOC_OPTIONS "ff" -#else # define MOZ_MALLOC_OPTIONS "" -#endif /* * MALLOC_STATS enables statistics calculation, and is required for diff --git a/memory/volatile/tests/TestVolatileBuffer.cpp b/memory/volatile/tests/TestVolatileBuffer.cpp index 9a4a8781d7..dff8e794a8 100644 --- a/memory/volatile/tests/TestVolatileBuffer.cpp +++ b/memory/volatile/tests/TestVolatileBuffer.cpp @@ -68,14 +68,7 @@ TEST(VolatileBufferTest, RealVolatileBuffersWork) } // Test purging if we know how to -#if defined(MOZ_WIDGET_GONK) - // This also works on Android, but we need root. - int fd = open("/" ASHMEM_NAME_DEF, O_RDWR); - - ASSERT_GE(fd, 0) << "Failed to open ashmem device"; - ASSERT_GE(ioctl(fd, ASHMEM_PURGE_ALL_CACHES, NULL), 0) - << "Failed to purge ashmem caches"; -#elif defined(XP_DARWIN) +#if defined(XP_DARWIN) int state; vm_purgable_control(mach_task_self(), (vm_address_t)NULL, VM_PURGABLE_PURGE_ALL, &state); -- cgit v1.2.3