Commit 1a9d4c6f authored by Mike Hommey's avatar Mike Hommey
Browse files

Bug 1363992 - Remove support for system jemalloc. r=njn

--HG--
extra : rebase_source : 9141402b6f9e84c67afc14303633d328eb5b652c
parent 6e5a8787
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then

  # Run jemalloc configure script

  if test -z "$MOZ_SYSTEM_JEMALLOC" -a "$MOZ_MEMORY" && test -n "$MOZ_JEMALLOC4" -o -n "$MOZ_REPLACE_MALLOC"; then
  if test "$MOZ_MEMORY" && test -n "$MOZ_JEMALLOC4" -o -n "$MOZ_REPLACE_MALLOC"; then
    ac_configure_args="--build=$build --host=$target --enable-stats --with-jemalloc-prefix=je_ --disable-valgrind"
    if test -n "$MOZ_DEBUG"; then
      ac_configure_args="$ac_configure_args --enable-debug"
+0 −4
Original line number Diff line number Diff line
@@ -11,12 +11,8 @@
#include <mozilla/Assertions.h>
#include "mozilla/Types.h"

#if defined(MOZ_SYSTEM_JEMALLOC)
#include MALLOC_H
#else
#define DLLEXPORT
#include "jemalloc/jemalloc.h"
#endif

#ifdef XP_WIN
#include <windows.h>
+1 −2
Original line number Diff line number Diff line
@@ -51,8 +51,7 @@ if CONFIG['MOZ_GLUE_IN_PROGRAM']:
    DIST_INSTALL = True

# Keep jemalloc separated when mozglue is statically linked
if CONFIG['MOZ_MEMORY'] and (CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') or
                             CONFIG['MOZ_SYSTEM_JEMALLOC']):
if CONFIG['MOZ_MEMORY'] and CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'):
    FINAL_LIBRARY = 'mozglue'

if CONFIG['MOZ_REPLACE_MALLOC'] and CONFIG['OS_TARGET'] == 'Darwin':
+1 −5
Original line number Diff line number Diff line
@@ -14,11 +14,7 @@

#include <stdbool.h>

#if defined(MOZ_SYSTEM_JEMALLOC)
#  include MALLOC_H
#else
#include "jemalloc/jemalloc.h"
#endif

/*
 *  CTL_* macros are from memory/jemalloc/src/src/stats.c with changes:
+26 −31
Original line number Diff line number Diff line
@@ -126,7 +126,6 @@

#include "mozilla/Types.h"

#if !defined(MOZ_SYSTEM_JEMALLOC)
#ifdef MOZ_MEMORY_IMPL
#  if defined(MOZ_JEMALLOC_IMPL) && defined(MOZ_REPLACE_MALLOC) && !defined(MOZ_REPLACE_JEMALLOC)
#    define mozmem_malloc_impl(a)     je_ ## a
@@ -155,14 +154,10 @@
#  endif
#endif

/* All other jemalloc3 functions are prefixed with "je_", except when
 * building against an unprefixed system jemalloc library */
/* All other jemalloc3 functions are prefixed with "je_" */
#define je_(a) je_ ## a
#else /* defined(MOZ_SYSTEM_JEMALLOC) */
#  define je_(a) a
#endif

#if !defined(MOZ_MEMORY_IMPL) || defined(MOZ_SYSTEM_JEMALLOC)
#if !defined(MOZ_MEMORY_IMPL)
#  define MOZ_MEMORY_API MFBT_API
#  define MOZ_JEMALLOC_API MFBT_API
#endif
Loading