Bug 778078 - Disable GLib slice allocator on systems with jemalloc in libc. r=glandium

This commit is contained in:
Jan Beich 2012-10-17 16:36:43 +02:00
parent 439cba09f1
commit c7cd60add5

View File

@ -131,6 +131,11 @@ using mozilla::unused;
#include <stdlib.h>
// for old system jemalloc version check
#if !defined(MOZ_MEMORY) && defined(__NetBSD__)
#include <sys/param.h>
#endif
#ifdef XP_UNIX
#include <sys/stat.h>
#include <unistd.h>
@ -3824,7 +3829,8 @@ XREMain::XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
ScopedLogging log;
#if defined(MOZ_WIDGET_GTK)
#ifdef MOZ_MEMORY
#if defined(MOZ_MEMORY) || defined(__FreeBSD__) \
|| defined(__NetBSD__) && __NetBSD_Version__ >= 500000000
// Disable the slice allocator, since jemalloc already uses similar layout
// algorithms, and using a sub-allocator tends to increase fragmentation.
// This must be done before g_thread_init() is called.