diff options
Diffstat (limited to 'memory/mozalloc/mozalloc.cpp')
-rw-r--r-- | memory/mozalloc/mozalloc.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/memory/mozalloc/mozalloc.cpp b/memory/mozalloc/mozalloc.cpp index 55d36d80be..1ae071ea04 100644 --- a/memory/mozalloc/mozalloc.cpp +++ b/memory/mozalloc/mozalloc.cpp @@ -19,10 +19,6 @@ #define MOZ_MEMORY_IMPL #include "mozmemory_wrap.h" -#if defined(XP_DARWIN) -#include <malloc/malloc.h> // for malloc_size -#endif - // See mozmemory_wrap.h for more details. This file is part of libmozglue, so // it needs to use _impl suffixes. However, with libmozglue growing, this is // becoming cumbersome, so we will likely use a malloc.h wrapper of some sort @@ -153,17 +149,6 @@ moz_posix_memalign(void **ptr, size_t alignment, size_t size) if (code) return code; -#if defined(XP_DARWIN) - // Workaround faulty OSX posix_memalign, which provides memory with the - // incorrect alignment sometimes, but returns 0 as if nothing was wrong. - size_t mask = alignment - 1; - if (((size_t)(*ptr) & mask) != 0) { - void* old = *ptr; - code = moz_posix_memalign(ptr, alignment, size); - free(old); - } -#endif - return code; } @@ -203,9 +188,7 @@ moz_malloc_usable_size(void *ptr) if (!ptr) return 0; -#if defined(XP_DARWIN) - return malloc_size(ptr); -#elif defined(HAVE_MALLOC_USABLE_SIZE) || defined(MOZ_MEMORY) +#if defined(HAVE_MALLOC_USABLE_SIZE) || defined(MOZ_MEMORY) return malloc_usable_size_impl(ptr); #elif defined(XP_WIN) return _msize(ptr); |