mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-28 01:57:30 +09:00
Remove support for system jemalloc.
This commit is contained in:
parent
89beaa72ad
commit
c76d18a40d
10 changed files with 32 additions and 64 deletions
|
|
@ -8,7 +8,7 @@ if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then
|
||||||
|
|
||||||
# Run jemalloc configure script
|
# 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"
|
ac_configure_args="--build=$build --host=$target --enable-stats --with-jemalloc-prefix=je_ --disable-valgrind"
|
||||||
# We're using memalign for _aligned_malloc in memory/build/mozmemory_wrap.c
|
# We're using memalign for _aligned_malloc in memory/build/mozmemory_wrap.c
|
||||||
# on Windows, so just export memalign on all platforms.
|
# on Windows, so just export memalign on all platforms.
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,8 @@
|
||||||
#include <mozilla/Assertions.h>
|
#include <mozilla/Assertions.h>
|
||||||
#include "mozilla/Types.h"
|
#include "mozilla/Types.h"
|
||||||
|
|
||||||
#if defined(MOZ_SYSTEM_JEMALLOC)
|
|
||||||
#include MALLOC_H
|
|
||||||
#else
|
|
||||||
#define DLLEXPORT
|
#define DLLEXPORT
|
||||||
#include "jemalloc/jemalloc.h"
|
#include "jemalloc/jemalloc.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef XP_WIN
|
#ifdef XP_WIN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,7 @@ if CONFIG['MOZ_GLUE_IN_PROGRAM']:
|
||||||
DIST_INSTALL = True
|
DIST_INSTALL = True
|
||||||
|
|
||||||
# Keep jemalloc separated when mozglue is statically linked
|
# Keep jemalloc separated when mozglue is statically linked
|
||||||
if CONFIG['MOZ_MEMORY'] and (CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') or
|
if CONFIG['MOZ_MEMORY'] and CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'):
|
||||||
CONFIG['MOZ_SYSTEM_JEMALLOC']):
|
|
||||||
FINAL_LIBRARY = 'mozglue'
|
FINAL_LIBRARY = 'mozglue'
|
||||||
|
|
||||||
if CONFIG['MOZ_REPLACE_MALLOC'] and CONFIG['OS_TARGET'] == 'Darwin':
|
if CONFIG['MOZ_REPLACE_MALLOC'] and CONFIG['OS_TARGET'] == 'Darwin':
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,7 @@
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#if defined(MOZ_SYSTEM_JEMALLOC)
|
#include "jemalloc/jemalloc.h"
|
||||||
# include MALLOC_H
|
|
||||||
#else
|
|
||||||
# include "jemalloc/jemalloc.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CTL_* macros are from memory/jemalloc/src/src/stats.c with changes:
|
* CTL_* macros are from memory/jemalloc/src/src/stats.c with changes:
|
||||||
|
|
|
||||||
|
|
@ -125,8 +125,7 @@
|
||||||
|
|
||||||
#include "mozilla/Types.h"
|
#include "mozilla/Types.h"
|
||||||
|
|
||||||
#if !defined(MOZ_SYSTEM_JEMALLOC)
|
#ifdef MOZ_MEMORY_IMPL
|
||||||
# ifdef MOZ_MEMORY_IMPL
|
|
||||||
# if defined(MOZ_JEMALLOC_IMPL) && defined(MOZ_REPLACE_MALLOC) && !defined(MOZ_REPLACE_JEMALLOC)
|
# if defined(MOZ_JEMALLOC_IMPL) && defined(MOZ_REPLACE_MALLOC) && !defined(MOZ_REPLACE_JEMALLOC)
|
||||||
# define mozmem_malloc_impl(a) je_ ## a
|
# define mozmem_malloc_impl(a) je_ ## a
|
||||||
# define mozmem_jemalloc_impl(a) je_ ## a
|
# define mozmem_jemalloc_impl(a) je_ ## a
|
||||||
|
|
@ -152,16 +151,12 @@
|
||||||
# ifdef XP_WIN
|
# ifdef XP_WIN
|
||||||
# define mozmem_dup_impl(a) wrap_ ## a
|
# define mozmem_dup_impl(a) wrap_ ## a
|
||||||
# endif
|
# endif
|
||||||
# endif
|
|
||||||
|
|
||||||
/* All other jemalloc3 functions are prefixed with "je_", except when
|
|
||||||
* building against an unprefixed system jemalloc library */
|
|
||||||
# define je_(a) je_ ## a
|
|
||||||
#else /* defined(MOZ_SYSTEM_JEMALLOC) */
|
|
||||||
# define je_(a) a
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(MOZ_MEMORY_IMPL) || defined(MOZ_SYSTEM_JEMALLOC)
|
/* All other jemalloc3 functions are prefixed with "je_" */
|
||||||
|
#define je_(a) je_ ## a
|
||||||
|
|
||||||
|
#if !defined(MOZ_MEMORY_IMPL)
|
||||||
# define MOZ_MEMORY_API MFBT_API
|
# define MOZ_MEMORY_API MFBT_API
|
||||||
# define MOZ_JEMALLOC_API MFBT_API
|
# define MOZ_JEMALLOC_API MFBT_API
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,6 @@
|
||||||
# error Should not compile this file when replace-malloc is disabled
|
# error Should not compile this file when replace-malloc is disabled
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MOZ_SYSTEM_JEMALLOC
|
|
||||||
# error Should not compile this file when we want to use native jemalloc
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "mozmemory_wrap.h"
|
#include "mozmemory_wrap.h"
|
||||||
|
|
||||||
/* Declare all je_* functions */
|
/* Declare all je_* functions */
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ if CONFIG['MOZ_MEMORY']:
|
||||||
]
|
]
|
||||||
|
|
||||||
if CONFIG['MOZ_JEMALLOC4'] or CONFIG['MOZ_REPLACE_MALLOC']:
|
if CONFIG['MOZ_JEMALLOC4'] or CONFIG['MOZ_REPLACE_MALLOC']:
|
||||||
if not CONFIG['MOZ_SYSTEM_JEMALLOC']:
|
|
||||||
DIRS += ['jemalloc']
|
DIRS += ['jemalloc']
|
||||||
|
|
||||||
if CONFIG['MOZ_REPLACE_MALLOC']:
|
if CONFIG['MOZ_REPLACE_MALLOC']:
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ if CONFIG['OS_TARGET'] == 'WINNT':
|
||||||
|
|
||||||
if not CONFIG['JS_STANDALONE']:
|
if not CONFIG['JS_STANDALONE']:
|
||||||
|
|
||||||
if CONFIG['MOZ_MEMORY'] and (CONFIG['MOZ_SYSTEM_JEMALLOC'] or FORCE_SHARED_LIB):
|
if CONFIG['MOZ_MEMORY'] and FORCE_SHARED_LIB:
|
||||||
pass
|
pass
|
||||||
# TODO: SHARED_LIBRARY_LIBS go here
|
# TODO: SHARED_LIBRARY_LIBS go here
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -4345,8 +4345,6 @@ Android|WINNT|Darwin)
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if test -n "$MOZ_REPLACE_MALLOC"; then
|
if test -n "$MOZ_REPLACE_MALLOC"; then
|
||||||
MOZ_SYSTEM_JEMALLOC=
|
|
||||||
|
|
||||||
dnl Replace-malloc Mac linkage quirks
|
dnl Replace-malloc Mac linkage quirks
|
||||||
if test -n "$MACOSX_DEPLOYMENT_TARGET"; then
|
if test -n "$MACOSX_DEPLOYMENT_TARGET"; then
|
||||||
AC_CACHE_CHECK([how to do weak dynamic linking],
|
AC_CACHE_CHECK([how to do weak dynamic linking],
|
||||||
|
|
@ -4413,15 +4411,6 @@ if test -z "$MOZ_MEMORY"; then
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
if test -n "$MOZ_JEMALLOC4" -a -z "$MOZ_REPLACE_MALLOC"; then
|
|
||||||
MOZ_SYSTEM_JEMALLOC=1
|
|
||||||
AC_CHECK_FUNCS(mallctl nallocx,,
|
|
||||||
[MOZ_SYSTEM_JEMALLOC=
|
|
||||||
break])
|
|
||||||
if test -n "$MOZ_SYSTEM_JEMALLOC"; then
|
|
||||||
AC_DEFINE(MOZ_SYSTEM_JEMALLOC)
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test "x$MOZ_DEBUG" = "x1"; then
|
if test "x$MOZ_DEBUG" = "x1"; then
|
||||||
AC_DEFINE(MOZ_MEMORY_DEBUG)
|
AC_DEFINE(MOZ_MEMORY_DEBUG)
|
||||||
fi
|
fi
|
||||||
|
|
@ -4434,7 +4423,6 @@ else
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi # MOZ_MEMORY
|
fi # MOZ_MEMORY
|
||||||
AC_SUBST(MOZ_SYSTEM_JEMALLOC)
|
|
||||||
AC_SUBST(MOZ_GLUE_IN_PROGRAM)
|
AC_SUBST(MOZ_GLUE_IN_PROGRAM)
|
||||||
|
|
||||||
# Allow the application to provide a subconfigure script.
|
# Allow the application to provide a subconfigure script.
|
||||||
|
|
|
||||||
|
|
@ -98,8 +98,7 @@ FINAL_LIBRARY = 'xul'
|
||||||
# Note: On Windows our sqlite build assumes we use jemalloc. If you disable
|
# Note: On Windows our sqlite build assumes we use jemalloc. If you disable
|
||||||
# MOZ_STORAGE_MEMORY on Windows, you will also need to change the "ifdef
|
# MOZ_STORAGE_MEMORY on Windows, you will also need to change the "ifdef
|
||||||
# MOZ_MEMORY" options in db/sqlite3/src/Makefile.in.
|
# MOZ_MEMORY" options in db/sqlite3/src/Makefile.in.
|
||||||
if CONFIG['MOZ_MEMORY'] and (not CONFIG['MOZ_SYSTEM_SQLITE']
|
if CONFIG['MOZ_MEMORY'] and not CONFIG['MOZ_SYSTEM_SQLITE']:
|
||||||
or CONFIG['MOZ_SYSTEM_JEMALLOC']):
|
|
||||||
if CONFIG['OS_TARGET'] != 'Android':
|
if CONFIG['OS_TARGET'] != 'Android':
|
||||||
DEFINES['MOZ_STORAGE_MEMORY'] = True
|
DEFINES['MOZ_STORAGE_MEMORY'] = True
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue