Bug 678195 - Remove old style jemalloc. r=khuey
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 23 Aug 2011 15:43:17 +0200
changeset 75855 011569fdc55597714e413d17d25e1ca801ac9a11
parent 75854 9b6e97e91525e9e146e73ce698684c9f6cc41209
child 75856 c3657f68bd662048665ec788d1975bb1366bc410
push id1472
push userbmo@edmorley.co.uk
push dateThu, 25 Aug 2011 07:46:52 +0000
treeherdermozilla-inbound@c72e38696950 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs678195
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 678195 - Remove old style jemalloc. r=khuey
browser/installer/Makefile.in
browser/installer/package-manifest.in
browser/installer/removed-files.in
build/win32/Makefile.in
config/autoconf.mk.in
configure.in
memory/jemalloc/Makefile.in
memory/jemalloc/apply-ed-patches.pl
memory/jemalloc/build-crt.py
memory/jemalloc/crtvc8sp1-amd64.diff
memory/jemalloc/crtvc8sp1-intel.diff
memory/jemalloc/crtvc9sp1-amd64.diff
memory/jemalloc/crtvc9sp1-intel.diff
memory/jemalloc/ed.exe
memory/jemalloc/jemalloc.c
memory/jemalloc/jemalloc.h
mobile/installer/Makefile.in
mobile/installer/package-manifest.in
mobile/installer/removed-files.in
toolkit/mozapps/installer/packager.mk
--- a/browser/installer/Makefile.in
+++ b/browser/installer/Makefile.in
@@ -83,20 +83,16 @@ ifdef MOZ_ANGLE
 DEFINES += -DMOZ_ANGLE=$(MOZ_ANGLE)
 DEFINES += -DMOZ_D3DX9_DLL=$(MOZ_D3DX9_DLL)
 DEFINES += -DMOZ_D3DCOMPILER_DLL=$(MOZ_D3DCOMPILER_DLL)
 endif
 
 include $(topsrcdir)/ipc/app/defs.mk
 DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME)
 
-ifdef WIN32_OLD_STYLE_JEMALLOC
-DEFINES += -DWIN32_OLD_STYLE_JEMALLOC=1
-endif
-
 ifneq (,$(filter aurora beta,$(MOZ_UPDATE_CHANNEL)))
 DEFINES += -DSHIP_FEEDBACK=1
 endif
 
 ifdef MOZ_PKG_MANIFEST_P
 MOZ_PKG_MANIFEST = package-manifest
 
 $(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) $(GLOBAL_DEPS)
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -55,20 +55,16 @@
 #endif
 #ifdef XP_MACOSX
 @BINPATH@/@MOZ_CHILD_PROCESS_NAME@.app/
 @BINPATH@/@DLL_PREFIX@plugin_child_interpose@DLL_SUFFIX@
 #else
 @BINPATH@/@MOZ_CHILD_PROCESS_NAME@
 #endif
 #ifdef XP_WIN32
-#ifdef WIN32_OLD_STYLE_JEMALLOC
-@BINPATH@/mozcrt19.dll
-@BINPATH@/mozcpp19.dll
-#else
 #ifdef MOZ_MEMORY
 @BINPATH@/jemalloc.dll
 #endif
 #if _MSC_VER == 1400
 @BINPATH@/Microsoft.VC80.CRT.manifest
 @BINPATH@/msvcm80.dll
 @BINPATH@/msvcp80.dll
 @BINPATH@/msvcr80.dll
@@ -76,17 +72,16 @@
 @BINPATH@/Microsoft.VC90.CRT.manifest
 @BINPATH@/msvcm90.dll
 @BINPATH@/msvcp90.dll
 @BINPATH@/msvcr90.dll
 #elif _MSC_VER == 1600
 @BINPATH@/msvcp100.dll
 @BINPATH@/msvcr100.dll
 #endif
-#endif
 
 #endif
 
 [browser]
 ; [Base Browser Files]
 #ifndef XP_UNIX
 @BINPATH@/@MOZ_APP_NAME@.exe
 #else
--- a/browser/installer/removed-files.in
+++ b/browser/installer/removed-files.in
@@ -1267,25 +1267,18 @@ xpicleanup@BIN_SUFFIX@
   res/fonts/mathfontSymbol.properties
 #endif
 #ifdef XP_WIN
   components/brwsrcmp.dll
   components/jsd3250.dll
   components/nsPostUpdateWin.js
   js3250.dll
   plugins/npnul32.dll
-  #ifdef WIN32_OLD_STYLE_JEMALLOC
-    Microsoft.VC80.CRT.manifest
-    msvcm80.dll
-    msvcp80.dll
-    msvcr80.dll
-  #else
-    mozcrt19.dll
-    mozcpp19.dll
-  #endif
+  mozcrt19.dll
+  mozcpp19.dll
 #endif
 @DLL_PREFIX@xpcom_core@DLL_SUFFIX@
 components/@DLL_PREFIX@jar50@DLL_SUFFIX@
 #ifdef XP_WIN
   components/xpinstal.dll
 #else
   components/@DLL_PREFIX@jsd@DLL_SUFFIX@
   components/@DLL_PREFIX@xpinstall@DLL_SUFFIX@
--- a/build/win32/Makefile.in
+++ b/build/win32/Makefile.in
@@ -59,17 +59,16 @@ DIRS += \
 PROGRAM = crashinject$(BIN_SUFFIX)
 USE_STATIC_LIBS = 1
 CPPSRCS = crashinject.cpp
 
 endif # ENABLE_TESTS
 
 include $(topsrcdir)/config/rules.mk
 
-ifndef WIN32_OLD_STYLE_JEMALLOC
 ifdef WIN32_REDIST_DIR
 ifndef MOZ_DEBUG
 
 ifeq (1400,$(_MSC_VER))
 REDIST_FILES = \
 	Microsoft.VC80.CRT.manifest \
 	msvcm80.dll \
 	msvcp80.dll \
@@ -96,9 +95,8 @@ endif
 ifdef REDIST_FILES
 libs::
 	mkdir -p $(FINAL_TARGET)
 	install --preserve-timestamps $(foreach f,$(REDIST_FILES),"$(WIN32_REDIST_DIR)"/$(f)) $(FINAL_TARGET)
 endif
 
 endif # ! MOZ_DEBUG
 endif # WIN32_REDIST_DIR
-endif # ! MOZ_MEMORY
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -623,19 +623,17 @@ USE_GSSAPI	= @USE_GSSAPI@
 MOZILLA_OFFICIAL = @MOZILLA_OFFICIAL@
 
 # Win32 options
 MOZ_BROWSE_INFO	= @MOZ_BROWSE_INFO@
 MOZ_TOOLS_DIR	= @MOZ_TOOLS_DIR@
 MOZ_QUANTIFY	= @MOZ_QUANTIFY@
 MSMANIFEST_TOOL = @MSMANIFEST_TOOL@
 WIN32_REDIST_DIR = @WIN32_REDIST_DIR@
-WIN32_CRT_SRC_DIR = @WIN32_CRT_SRC_DIR@
 MOZ_MEMORY_LDFLAGS = @MOZ_MEMORY_LDFLAGS@
-WIN32_OLD_STYLE_JEMALLOC = @WIN32_OLD_STYLE_JEMALLOC@
 WIN32_CRT_LIBS = @WIN32_CRT_LIBS@
 MOZ_CRT_CPU_ARCH = @MOZ_CRT_CPU_ARCH@
 
 # This is for custom CRT building
 ifdef MOZ_MEMORY
 DLLFLAGS = @DLLFLAGS@
 endif
 
--- a/configure.in
+++ b/configure.in
@@ -7413,64 +7413,30 @@ else
   *-netbsd*)
     AC_DEFINE(MOZ_MEMORY_BSD)
     ;;
   *-solaris*)
     AC_DEFINE(MOZ_MEMORY_SOLARIS)
     ;;
   *-mingw*)
     AC_DEFINE(MOZ_MEMORY_WINDOWS)
-    AC_MSG_CHECKING([for VC2005/2008++ CRT source])
-    if test "$CC_VERSION" == "14.00.50727.762" -o "$CC_VERSION" == "15.00.30729.01"; then
-      if test -z "$WIN32_CRT_SRC_DIR" -a -n "$VCINSTALLDIR"; then
-        WIN32_CRT_SRC_DIR="$VCINSTALLDIR\crt\src"
-      fi
-      if test -n "$WIN32_CRT_SRC_DIR" -a -d "$WIN32_CRT_SRC_DIR"; then
-        AC_MSG_RESULT([yes])
-        dnl cpu check
-        case "${target_cpu}" in
-        i*86)
-          MOZ_CRT_CPU_ARCH=intel
-          ;;
-        x86_64)
-          MOZ_CRT_CPU_ARCH=amd64
-          ;;
-        *)
-          AC_MSG_ERROR([--enable-jemalloc not supported on ${target}])
-          ;;
-        esac
-        AC_SUBST(MOZ_CRT_CPU_ARCH)
-        WIN32_OLD_STYLE_JEMALLOC=1
-        AC_DEFINE(WIN32_OLD_STYLE_JEMALLOC)
-        WIN32_CRT_SRC_DIR=`cd "$WIN32_CRT_SRC_DIR" && pwd -W`
-        _objdir_win=`pwd -W`
-        WIN32_CUSTOM_CRT_DIR="$_objdir_win/memory/jemalloc/crtsrc/build/$MOZ_CRT_CPU_ARCH"
-        MOZ_MEMORY_LDFLAGS="-MANIFEST:NO -LIBPATH:\"$WIN32_CUSTOM_CRT_DIR\" -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -NODEFAULTLIB:msvcprt -NODEFAULTLIB:msvcprtd -DEFAULTLIB:mozcrt19 -DEFAULTLIB:mozcpp19"
-      fi
-    fi
-    if test -z "$WIN32_OLD_STYLE_JEMALLOC"; then
-      AC_MSG_RESULT([no])
-      WIN32_NEW_STYLE_JEMALLOC=1
-      AC_DEFINE(WIN32_NEW_STYLE_JEMALLOC)
-      WIN32_CRT_SRC_DIR=
-      if test -z "$MOZ_DEBUG"; then
-        WIN32_CRT_LIBS="msvcrt.lib msvcprt.lib"
-      else
-        WIN32_CRT_LIBS="msvcrtd.lib msvcprtd.lib"
-      fi
-      dnl Look for a broken crtdll.obj
-      WIN32_CRTDLL_FULLPATH=`lib -nologo -list $WIN32_CRT_LIBS | grep crtdll\\.obj`
-      lib -NOLOGO -OUT:crtdll.obj $WIN32_CRT_LIBS -EXTRACT:$WIN32_CRTDLL_FULLPATH
-      if grep -q '__imp__\{0,1\}free' crtdll.obj; then
-        MOZ_MEMORY_LDFLAGS='-LIBPATH:$(DIST)/lib -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -NODEFAULTLIB:msvcprt -NODEFAULTLIB:msvcprtd -DEFAULTLIB:mozcrt'
-      else
-        MOZ_MEMORY_LDFLAGS='$(DIST)/../memory/jemalloc/jemalloc.lib'
-      fi
-      rm crtdll.obj
-    fi
+    if test -z "$MOZ_DEBUG"; then
+      WIN32_CRT_LIBS="msvcrt.lib msvcprt.lib"
+    else
+      WIN32_CRT_LIBS="msvcrtd.lib msvcprtd.lib"
+    fi
+    dnl Look for a broken crtdll.obj
+    WIN32_CRTDLL_FULLPATH=`lib -nologo -list $WIN32_CRT_LIBS | grep crtdll\\.obj`
+    lib -NOLOGO -OUT:crtdll.obj $WIN32_CRT_LIBS -EXTRACT:$WIN32_CRTDLL_FULLPATH
+    if grep -q '__imp__\{0,1\}free' crtdll.obj; then
+      MOZ_MEMORY_LDFLAGS='-LIBPATH:$(DIST)/lib -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -NODEFAULTLIB:msvcprt -NODEFAULTLIB:msvcprtd -DEFAULTLIB:mozcrt'
+    else
+      MOZ_MEMORY_LDFLAGS='$(DIST)/../memory/jemalloc/jemalloc.lib'
+    fi
+    rm crtdll.obj
 
     dnl Also pass this to NSPR/NSS
     DLLFLAGS="$DLLFLAGS $MOZ_MEMORY_LDFLAGS"
     export DLLFLAGS
     ;;
   *)
     AC_MSG_ERROR([--enable-jemalloc not supported on ${target}])
     ;;
@@ -7480,19 +7446,17 @@ else
     dnl NB: this must be kept in sync with jemalloc.h
     AC_DEFINE(HAVE_JEMALLOC_VALLOC)
   fi
   AC_DEFINE(HAVE_JEMALLOC_POSIX_MEMALIGN)
   AC_DEFINE(HAVE_JEMALLOC_MEMALIGN)
 fi # MOZ_MEMORY
 AC_SUBST(MOZ_MEMORY)
 AC_SUBST(MOZ_MEMORY_LDFLAGS)
-AC_SUBST(WIN32_OLD_STYLE_JEMALLOC)
 AC_SUBST(WIN32_CRT_LIBS)
-AC_SUBST(WIN32_CRT_SRC_DIR)
 dnl Need to set this for make because NSS doesn't have configure
 AC_SUBST(DLLFLAGS)
 
 dnl ========================================================
 dnl = Use malloc wrapper lib
 dnl ========================================================
 MOZ_ARG_ENABLE_BOOL(wrap-malloc,
 [  --enable-wrap-malloc    Wrap malloc calls (gnu linker only)],
--- a/memory/jemalloc/Makefile.in
+++ b/memory/jemalloc/Makefile.in
@@ -44,131 +44,63 @@ VPATH		= @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= jemalloc
 
 # jemalloc.c properly uses 'static', so don't burden it with manually exposing
 # symbols.
 VISIBILITY_FLAGS=
 
-ifeq (WINNT,$(OS_TARGET))
-ifdef WIN32_OLD_STYLE_JEMALLOC
-# Building the CRT from source
-CRT_OBJ_DIR = $(CURDIR)/crtsrc
-MOZ_CRT_DLL_NAME = mozcrt19
-MOZ_CRTCPP_DLL_NAME = mozcpp19
-MOZ_CRT_STATIC_LIBS = libcmt libcpmt
-MOZ_CRT_DLL = $(CRT_OBJ_DIR)/build/$(MOZ_CRT_CPU_ARCH)/$(MOZ_CRT_DLL_NAME).dll
-MOZ_CRT_IMPORT_LIB = $(CRT_OBJ_DIR)/build/$(MOZ_CRT_CPU_ARCH)/$(MOZ_CRT_DLL_NAME).lib
-MOZ_CRTCPP_DLL = $(CRT_OBJ_DIR)/build/$(MOZ_CRT_CPU_ARCH)/$(MOZ_CRTCPP_DLL_NAME).dll
-MOZ_CRTCPP_IMPORT_LIB = $(CRT_OBJ_DIR)/build/$(MOZ_CRT_CPU_ARCH)/$(MOZ_CRTCPP_DLL_NAME).lib
-
-# copy the CRT DLLs to dist/bin,
-# copy the import libs to dist/lib
-libs:: $(MOZ_CRT_DLL) $(MOZ_CRT_IMPORT_LIB)
-	$(INSTALL) $(MOZ_CRT_DLL) $(MOZ_CRTCPP_DLL) $(FINAL_TARGET)
-	$(INSTALL) $(MOZ_CRT_IMPORT_LIB) $(MOZ_CRTCPP_IMPORT_LIB) $(DIST)/lib
-
-$(MOZ_CRT_IMPORT_LIB): $(MOZ_CRT_DLL)
-
-define EXTRACT_CMD
-cd $(CRT_OBJ_DIR)/$(MOZ_CRT_CPU_ARCH)/$(i)_lib && lib "-extract:..\\build\\$(MOZ_CRT_CPU_ARCH)\\$(i)_obj\\unhandld.obj" eh.lib
-
-endef # don't touch the blank line. actually, don't touch anything in this file.
-
-# patch if necessary
-ifeq ($(CC_VERSION), 14.00.50727.762)
-CRTDIFF=crtvc8sp1-$(MOZ_CRT_CPU_ARCH).diff
-else
-CRTDIFF=crtvc9sp1-$(MOZ_CRT_CPU_ARCH).diff
-endif
-
-$(CRT_OBJ_DIR)/jemalloc.c: $(srcdir)/$(CRTDIFF)
-	rm -rf $(CRT_OBJ_DIR)
-	cp -R "$(WIN32_CRT_SRC_DIR)" $(CRT_OBJ_DIR)
-# per http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1189363&SiteID=1
-	$(foreach i,dll mt xdll xmt,$(EXTRACT_CMD))
-# truly awful
-#XXX: get ed into mozillabuild, bug 415123
-	$(PERL) $(srcdir)/apply-ed-patches.pl $(srcdir)/$(CRTDIFF) \
-	$(CRT_OBJ_DIR) $(srcdir)/ed.exe
-
-$(MOZ_CRT_DLL): \
-  $(CRT_OBJ_DIR)/jemalloc.c $(srcdir)/jemalloc.c $(srcdir)/jemalloc.h \
-  $(srcdir)/jemalloc_types.h $(srcdir)/rb.h
-	cp $(srcdir)/jemalloc.c $(srcdir)/jemalloc.h $(srcdir)/jemalloc_types.h $(srcdir)/rb.h \
-	$(CRT_OBJ_DIR)
-# this pretty much sucks, but nmake and make don't play well together
-	$(PYTHON) $(srcdir)/build-crt.py $(CRT_OBJ_DIR)
-# XXX: these don't link right for some reason; the problem is likely
-# that  not all the standard symbols are exported; looks like MSFT
-# never updated the sample.def files; could probably fix if someone
-# were ever bored enough. :-)
-	rm -f $(addsuffix .lib, $(addprefix $(CRT_OBJ_DIR)/build/$(MOZ_CRT_CPU_ARCH)/, $(MOZ_CRT_STATIC_LIBS)))
-	rm -f $(addsuffix .pdb, $(addprefix $(CRT_OBJ_DIR)/build/$(MOZ_CRT_CPU_ARCH)/, $(MOZ_CRT_STATIC_LIBS)))
-
-# but still export jemalloc.h
-EXPORTS = jemalloc.h jemalloc_types.h
-
-else
-
 CSRCS = jemalloc.c
 EXPORTS = jemalloc.h jemalloc_types.h
 LIBRARY_NAME = jemalloc
+
+ifeq (WINNT,$(OS_TARGET))
 FORCE_SHARED_LIB = 1
 
 MOZ_MEMORY_LDFLAGS = # Don't link against ourselves
 
 DEFFILE = $(srcdir)/jemalloc.def
 
 LDFLAGS += -ENTRY:DllMain
 
 NO_INSTALL_IMPORT_LIBRARY = 1
-
-endif
 else # Not Windows
 
 ifeq ($(OS_ARCH),SunOS)
 ifndef GNU_CC
 MODULE_OPTIMIZE_FLAGS = -xO5
 endif
 endif
 
-LIBRARY_NAME	= jemalloc
-
 # Build jemalloc as a shared lib.  This is mandatory for Darwin, since a library
 # init function is used on that platform.
 ifeq ($(OS_ARCH),Darwin)
 FORCE_SHARED_LIB= 1
 else
 DIST_INSTALL = 1
 FORCE_STATIC_LIB= 1
 endif
 
-EXPORTS = jemalloc.h jemalloc_types.h
-CSRCS   = jemalloc.c
-
 #XXX: PGO on Linux causes problems here
 # See bug 419470
 NO_PROFILE_GUIDED_OPTIMIZE = 1
 endif
 
 ifdef WRAP_MALLOC_CFLAGS
 DEFINES += -DWRAP_MALLOC
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 ifeq (Darwin,$(OS_TARGET))
 LDFLAGS += -init _jemalloc_darwin_init
 endif
 
 ifeq (WINNT,$(OS_TARGET))
-ifndef WIN32_OLD_STYLE_JEMALLOC
-
 # Roll our own custom logic here for the import library
 
 ###############################################################################
 #
 # Linking Mozilla itself to jemalloc is not particularly difficult.  To do this
 # we avoid linking directly to the Microsoft-provided CRT import libraries.
 # Instead, we link to our own import library which we generate here.  To
 # replace the CRT's malloc/free/other memory management symbols we export
@@ -235,11 +167,9 @@ msvc_removed.lib: msvc_combined.lib crtd
 
 # Extract the broken object file out of the combined library
 crtdll.obj: msvc_combined.lib
 	lib -OUT:$@ $^ -EXTRACT:$(CRTDLL_FULLPATH)
 
 # Grab both CRT libraries and combine them into one library to simplify things
 msvc_combined.lib:
 	lib -OUT:$@ $(WIN32_CRT_LIBS)
-
 endif
-endif
deleted file mode 100755
--- a/memory/jemalloc/apply-ed-patches.pl
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/perl
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is Mozilla build system.
-#
-# The Initial Developer of the Original Code is
-# Mozilla Foundation.
-# Portions created by the Initial Developer are Copyright (C) 2008
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#  Ted Mielczarek <ted.mielczarek@gmail.com>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-# Usage: apply-ed-patches.pl <source patch> <target directory> <path to ed>
-
-use FileHandle;
-
-sub do_patch {
-  my ($ed, $target_file, $patch_file, $fh) = @_;
-  # these keep winding up read only for me
-  chmod 0666, $target_file;
-  print $fh "w\n";
-  $fh->close();
-  print "$ed -s $target_file < $patch_file\n";
-  system "$ed -s $target_file < $patch_file\n";
-}
-
-my $header_done = 0;
-my ($target_file,$patch_file) = ('','');
-my $source_patch = $ARGV[0];
-my $srcdir = $ARGV[1];
-my $ed = $ARGV[2];
-$srcdir = "$srcdir/" unless $srcdir =~ m|/$|;
-my $pfh = new FileHandle($source_patch, 'r');
-while(<$pfh>) {
-  # skip initial comment header
-  next if !$header_done && /^#/;
-  $header_done = 1;
-
-  next if /^Only in/;
-  if (/^diff -re (\S+)/) {
-    my $new_file = $1;
-    $new_file =~ s|^crt/src/||;
-    $new_file = "$srcdir$new_file";
-    my $new_patch_file = "$new_file.patch";
-
-    if ($target_file ne '') {
-      do_patch $ed, $target_file, $patch_file, $fh;
-    }
-    $target_file = $new_file;
-    $patch_file = $new_patch_file;
-    $fh = new FileHandle($patch_file, 'w');
-    next;
-  }
-
-  print $fh $_ if $fh;
-}
-
-do_patch $ed, $target_file, $patch_file, $fh;
deleted file mode 100644
--- a/memory/jemalloc/build-crt.py
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env python
-
-import os, sys
-from subprocess import Popen, STDOUT, PIPE
-
-if 'MAKEFLAGS' in os.environ:
-  del os.environ['MAKEFLAGS']
-proc = Popen(['nmake', 'dll_', 'dll_p', 'mt'], stdout=PIPE, stderr=STDOUT,
-             cwd=sys.argv[1])
-
-while True:
-  line = proc.stdout.readline()
-  if line == '':
-    break
-  line = line.rstrip()
-  # explicitly ignore this fatal-sounding non-fatal error
-  if line == "NMAKE : fatal error U1052: file 'makefile.sub' not found" or line == "Stop.":
-    continue
-  print line
-sys.exit(proc.wait())
deleted file mode 100644
--- a/memory/jemalloc/crtvc8sp1-amd64.diff
+++ /dev/null
@@ -1,235 +0,0 @@
-diff -re crt/src/AMD64/_sample_.def crtsrc/AMD64/_sample_.def
-1160d
-717,718d
-663a
-    posix_memalign
-.
-637a
-    memalign
-.
-494a
-    malloc_usable_size
-    jemalloc_stats
-.
-330,335d
-318d
-307,308d
-75d
-9c
-LIBRARY MOZCRT19
-.
-diff -re crt/src/_sample_.rc crtsrc/_sample_.rc
-41c
-            VALUE "ProductName", "Mozilla Custom C Runtime"
-.
-39c
-            VALUE "OriginalFilename", "MOZCRT19.DLL"
-.
-37c
-            VALUE "OriginalFilename", "MOZCRT19D.DLL"
-.
-33c
-            VALUE "InternalName", "MOZCRT19.DLL"
-.
-31c
-            VALUE "InternalName", "MOZCRT19D.DLL"
-.
-27c
-            VALUE "CompanyName", "Mozilla Foundation"
-.
-Only in crtsrc/: build
-diff -re crt/src/crt0.c crtsrc/crt0.c
-273c
-	/*
-	 * this used to happen in _mtinit, but we need it before malloc
-	 */
-	_init_pointers();       /* initialize global function pointers */
-
-        if ( malloc_init_hard() )           /* initialize heap */
-.
-101a
-extern BOOL malloc_init_hard(void);
-.
-diff -re crt/src/crt0dat.c crtsrc/crt0dat.c
-789d
-778d
-diff -re crt/src/crtexe.c crtsrc/crtexe.c
-333,335d
-diff -re crt/src/crtheap.c crtsrc/crtheap.c
-61c
-    pv = calloc(count, size);
-.
-58,59d
-diff -re crt/src/crtlib.c crtsrc/crtlib.c
-781,788d
-416d
-400a
-		malloc_shutdown();
-
-.
-359d
-340d
-310,311d
-300d
-287c
-            /*
-             * this used to happen in _mtinit, but we need it before malloc
-             */
-            _init_pointers();       /* initialize global function pointers */
-
-            if ( malloc_init_hard() )   /* initialize heap */
-.
-43a
-extern BOOL malloc_init_hard(void);
-extern void malloc_shutdown(void);
-
-.
-diff -re crt/src/dllcrt0.c crtsrc/dllcrt0.c
-236,237d
-183d
-173d
-158d
-153,155d
-diff -re crt/src/gs_report.c crtsrc/gs_report.c
-23,41d
-diff -re crt/src/internal.h crtsrc/internal.h
-407a
-#endif
-.
-403a
-#if 0
-.
-diff -re crt/src/invarg.c crtsrc/invarg.c
-103a
-VOID NTAPI RtlCaptureContext (PCONTEXT ContextRecord);
-.
-diff -re crt/src/makefile crtsrc/makefile
-1840c
--def:$(DEFFILE2_DIR)\sample_p.def
-.
-1816c
- $(DEFFILE2_DIR)\sample_p.def $(CPPSRC_OBJS_DLL:*=dll) \
-.
-1745a
-$(DEFFILE_DIR)\$(RETAIL_LIB_NAME).def : $(DEFFILE_DIR)\_sample_.def
-	copy $** $@
-.
-1274d
-1228,1230d
-754c
-dll_ :: $(OBJROOT) $(OBJCPUDIR) $(OBJDIR_DLL) $(OBJDIR_DLL)\$(PURE_OBJ_DIR) \
-   	$(OBJDIR_DLL)\$(CPP_OBJ_DIR) \
-   	$(RELDIR_CPU) $(PDBDIR_CPU_DLL) $(MAKE_DIRS_DLL)
-.
-334c
-CC_OPTS_BASE=-c -nologo -Zlp8 -W3 -GFy -DWIND32
-.
-307,309c
-LINKER=link
-LINKLIB=link -lib
-LINKIMPLIB=link -lib
-.
-302,304c
-LINKER=link -nologo
-LINKLIB=link -lib -nologo
-LINKIMPLIB=link -lib -nologo
-.
-209d
-21,24c
-RETAIL_DLL_NAME=MOZCRT19
-RETAIL_LIB_NAME=mozcrt19
-RETAIL_DLLCPP_NAME=MOZCPP19
-RETAIL_LIBCPP_NAME=mozcpp19
-.
-diff -re crt/src/makefile.inc crtsrc/makefile.inc
-1624a
-$(OBJDIR)\unhandld.obj: $(PREOBJDIR)\unhandld.obj
-        copy $(PREOBJDIR)\unhandld.obj $@
-
-.
-1134a
-        $(OBJDIR)\memmove.obj \
-.
-618d
-402d
-342,353c
-        $(OBJDIR)\jemalloc.obj \
-.
-334,335d
-329,330d
-327d
-323d
-320d
-diff -re crt/src/makefile.sub crtsrc/makefile.sub
-103c
-LIB=link -lib -nologo
-.
-69c
-CFLAGS=$(CFLAGS) -O2 -DMOZ_MEMORY=1 -DMOZ_MEMORY_WINDOWS=1 -DMOZ_MEMORY_SIZEOF_PTR_2POW=3
-.
-67c
-CFLAGS=$(CFLAGS) -O2 -DMOZ_MEMORY=1 -DMOZ_MEMORY_WINDOWS=1 -DMOZ_MEMORY_SIZEOF_PTR_2POW=3
-.
-diff -re crt/src/malloc.h crtsrc/malloc.h
-189a
-#endif
-.
-177a
-
-#if 0
-.
-161d
-83a
-#endif
-.
-70a
-#if 0
-.
-diff -re crt/src/mlock.c crtsrc/mlock.c
-274c
-#endif
-.
-262a
-#if 0
-.
-diff -re crt/src/new.cpp crtsrc/new.cpp
-60d
-52,55d
-37,38c
-        break;
-.
-diff -re crt/src/nothrownew.cpp crtsrc/nothrownew.cpp
-37a
-#endif
-.
-31a
-#if 1
-        break;
-#else
-
-.
-diff -re crt/src/sample_p.def crtsrc/sample_p.def
-8c
-LIBRARY MOZCPP19
-.
-diff -re crt/src/sample_p.rc crtsrc/sample_p.rc
-41c
-            VALUE "ProductName", "Mozilla Custom C++ Runtime"
-.
-39c
-            VALUE "OriginalFilename", "MOZCPP19.DLL"
-.
-37c
-            VALUE "OriginalFilename", "MOZCPP19D.DLL"
-.
-33c
-            VALUE "InternalName", "MOZCPP19.DLL"
-.
-31c
-            VALUE "InternalName", "MOZCPP19D.DLL"
-.
-27c
-            VALUE "CompanyName", "Mozilla Foundation"
-.
-diff -re crt/src/tidtable.c crtsrc/tidtable.c
-393,394d
deleted file mode 100644
--- a/memory/jemalloc/crtvc8sp1-intel.diff
+++ /dev/null
@@ -1,229 +0,0 @@
-# The Microsoft C Runtime source code to which this document refers is available
-# directly from Microsoft Corporation, under a separate license.
-# Please ensure that if you are using that source code, you have appropriate
-# rights to use it.  By providing you access to this file, Mozilla Corporation
-# and its affiliates do not purport to grant any rights in that source code. 
-# Binaries are available under separate licenses at 
-# http://www.microsoft.com/downloads/details.aspx?familyid=200b2fd9-ae1a-4a14-984d-389c36f85647&displaylang=en
-diff -re crt/src/_sample_.rc ./crtsrc/_sample_.rc
-41c
-            VALUE "ProductName", "Mozilla Custom C Runtime"
-.
-39c
-            VALUE "OriginalFilename", "MOZCRT19.DLL"
-.
-37c
-            VALUE "OriginalFilename", "MOZCRT19D.DLL"
-.
-33c
-            VALUE "InternalName", "MOZCRT19.DLL"
-.
-31c
-            VALUE "InternalName", "MOZCRT19D.DLL"
-.
-27c
-            VALUE "CompanyName", "Mozilla Foundation"
-.
-diff -re crt/src/crt0.c ./crtsrc/crt0.c
-273c
-	/*
-	 * this used to happen in _mtinit, but we need it before malloc
-	 */
-	_init_pointers();       /* initialize global function pointers */
-
-        if ( malloc_init_hard() )           /* initialize heap */
-.
-101a
-extern BOOL malloc_init_hard(void);
-.
-diff -re crt/src/crt0dat.c ./crtsrc/crt0dat.c
-789d
-778d
-diff -re crt/src/crtexe.c ./crtsrc/crtexe.c
-333,335d
-diff -re crt/src/crtheap.c ./crtsrc/crtheap.c
-61c
-    pv = calloc(count, size);
-.
-58,59d
-diff -re crt/src/crtlib.c ./crtsrc/crtlib.c
-781,788d
-416d
-400a
-		malloc_shutdown();
-
-.
-359d
-340d
-310,311d
-300d
-287c
-            /*
-             * this used to happen in _mtinit, but we need it before malloc
-             */
-            _init_pointers();       /* initialize global function pointers */
-
-            if ( malloc_init_hard() )   /* initialize heap */
-.
-43a
-extern BOOL malloc_init_hard(void);
-extern void malloc_shutdown(void);
-
-.
-diff -re crt/src/dllcrt0.c ./crtsrc/dllcrt0.c
-236,237d
-183d
-173d
-158d
-153,155d
-diff -re crt/src/intel/_sample_.def ./crtsrc/intel/_sample_.def
-1208d
-723,724d
-669a
-    posix_memalign
-.
-643a
-    memalign
-.
-500a
-    malloc_usable_size
-    jemalloc_stats
-.
-336,341d
-324d
-313,314d
-81d
-9c
-LIBRARY MOZCRT19
-.
-diff -re crt/src/internal.h ./crtsrc/internal.h
-407a
-#endif
-.
-403a
-#if 0
-.
-diff -re crt/src/makefile ./crtsrc/makefile
-1840c
--def:$(DEFFILE2_DIR)\sample_p.def
-.
-1816c
- $(DEFFILE2_DIR)\sample_p.def $(CPPSRC_OBJS_DLL:*=dll) \
-.
-1745a
-$(DEFFILE_DIR)\$(RETAIL_LIB_NAME).def : $(DEFFILE_DIR)\_sample_.def
-	copy $** $@
-.
-1274d
-1228,1230d
-754c
-dll_ :: $(OBJROOT) $(OBJCPUDIR) $(OBJDIR_DLL) $(OBJDIR_DLL)\$(PURE_OBJ_DIR) \
-   	$(OBJDIR_DLL)\$(CPP_OBJ_DIR) \
-   	$(RELDIR_CPU) $(PDBDIR_CPU_DLL) $(MAKE_DIRS_DLL)
-.
-334c
-CC_OPTS_BASE=-c -nologo -Zlp8 -W3 -GFy -DWIND32
-.
-307,309c
-LINKER=link
-LINKLIB=link -lib
-LINKIMPLIB=link -lib
-.
-302,304c
-LINKER=link -nologo
-LINKLIB=link -lib -nologo
-LINKIMPLIB=link -lib -nologo
-.
-209d
-21,24c
-RETAIL_DLL_NAME=MOZCRT19
-RETAIL_LIB_NAME=mozcrt19
-RETAIL_DLLCPP_NAME=MOZCPP19
-RETAIL_LIBCPP_NAME=mozcpp19
-.
-diff -re crt/src/makefile.inc ./crtsrc/makefile.inc
-1624a
-$(OBJDIR)\unhandld.obj: $(PREOBJDIR)\unhandld.obj
-        copy $(PREOBJDIR)\unhandld.obj $@
-
-.
-618d
-402d
-342,353c
-        $(OBJDIR)\jemalloc.obj \
-.
-334,335d
-329,330d
-327d
-323d
-320d
-diff -re crt/src/makefile.sub ./crtsrc/makefile.sub
-103c
-LIB=link -lib -nologo
-.
-69c
-CFLAGS=$(CFLAGS) -O2 -DMOZ_MEMORY=1 -DMOZ_MEMORY_WINDOWS=1
-.
-diff -re crt/src/malloc.h ./crtsrc/malloc.h
-189a
-#endif
-.
-177a
-
-#if 0
-.
-161d
-83a
-#endif
-.
-70a
-#if 0
-.
-diff -re crt/src/mlock.c ./crtsrc/mlock.c
-274c
-#endif
-.
-262a
-#if 0
-.
-diff -re crt/src/new.cpp ./crtsrc/new.cpp
-60d
-52,55d
-37,38c
-        break;
-.
-diff -re crt/src/nothrownew.cpp ./crtsrc/nothrownew.cpp
-37a
-#endif
-.
-31a
-#if 1
-        break;
-#else
-
-.
-diff -re crt/src/sample_p.def ./crtsrc/sample_p.def
-8c
-LIBRARY MOZCPP19
-.
-diff -re crt/src/sample_p.rc ./crtsrc/sample_p.rc
-41c
-            VALUE "ProductName", "Mozilla Custom C++ Runtime"
-.
-39c
-            VALUE "OriginalFilename", "MOZCPP19.DLL"
-.
-37c
-            VALUE "OriginalFilename", "MOZCPP19D.DLL"
-.
-33c
-            VALUE "InternalName", "MOZCPP19.DLL"
-.
-31c
-            VALUE "InternalName", "MOZCPP19D.DLL"
-.
-27c
-            VALUE "CompanyName", "Mozilla Foundation"
-.
-diff -re crt/src/tidtable.c ./crtsrc/tidtable.c
-393,394d
deleted file mode 100644
--- a/memory/jemalloc/crtvc9sp1-amd64.diff
+++ /dev/null
@@ -1,250 +0,0 @@
-diff -re crt/src/AMD64/_sample_.def crtsrc/AMD64/_sample_.def
-1150d
-712,713d
-658a
-    posix_memalign
-.
-632a
-    memalign
-.
-489a
-    malloc_usable_size
-.
-461a
-    jemalloc_stats
-.
-325,330d
-313d
-307,308d
-75d
-9c
-LIBRARY MOZCRT19
-.
-diff -re crt/src/_sample_.rc crtsrc/_sample_.rc
-41c
-            VALUE "ProductName", "Mozilla Custom C Runtime"
-.
-39c
-            VALUE "OriginalFilename", "MOZCRT19.DLL"
-.
-37c
-            VALUE "OriginalFilename", "MOZCRT19D.DLL"
-.
-33c
-            VALUE "InternalName", "MOZCRT19.DLL"
-.
-31c
-            VALUE "InternalName", "MOZCRT19D.DLL"
-.
-27c
-            VALUE "CompanyName", "Mozilla Foundation"
-.
-diff -re crt/src/crt0.c crtsrc/crt0.c
-212c
-        /*
-         * this used to happen in _mtinit, but we need it before malloc
-         */
-        _init_pointers();       /* initialize global function pointers */
-
-        if ( malloc_init_hard() )                /* initialize heap */
-.
-87a
-extern BOOL malloc_init_hard(void);
-.
-diff -re crt/src/crt0dat.c crtsrc/crt0dat.c
-837d
-826d
-diff -re crt/src/crtdll.c crtsrc/crtdll.c
-31,40d
-diff -re crt/src/crtexe.c crtsrc/crtexe.c
-322,324d
-35,45d
-diff -re crt/src/crtheap.c crtsrc/crtheap.c
-61c
-    pv = calloc(count, size);
-.
-58,59d
-diff -re crt/src/crtlib.c crtsrc/crtlib.c
-686,693d
-355d
-339a
-                 malloc_shutdown();
-
-.
-298d
-279d
-249,250d
-239d
-226c
-            /*
-             * this used to happen in _mtinit, but we need it before malloc
-             */
-            _init_pointers();       /* initialize global function pointers */
-
-            if ( malloc_init_hard() )   /* initialize heap */
-.
-43a
-extern BOOL malloc_init_hard(void);
-extern void malloc_shutdown(void);
-
-.
-diff -re crt/src/dllcrt0.c crtsrc/dllcrt0.c
-189,190d
-136d
-126d
-111d
-106,108d
-diff -re crt/src/gs_report.c crtsrc/gs_report.c
-41c
-#endif
-.
-22c
-#if 0
-.
-diff -re crt/src/intel/_sample_.def crtsrc/intel/_sample_.def
-1198d
-718,719d
-664a
-    posix_memalign
-.
-638a
-    memalign
-.
-495a
-    malloc_usable_size
-.
-467a
-    jemalloc_stats
-.
-331,336d
-319d
-313,314d
-81d
-9c
-LIBRARY MOZCRT19
-.
-diff -re crt/src/internal.h crtsrc/internal.h
-413a
-#endif
-.
-409c
-#if 0
-.
-diff -re crt/src/invarg.c crtsrc/invarg.c
-53c
-#endif
-.
-34c
-#if 0
-.
-diff -re crt/src/makefile crtsrc/makefile
-1873c
--def:$(DEFFILE2_DIR)\sample_p.def
-.
-1841c
- $(DEFFILE2_DIR)\sample_p.def $(CPPSRC_OBJS_DLL:*=dll) \
-.
-1771a
-$(DEFFILE_DIR)\$(RETAIL_LIB_NAME).def : $(DEFFILE_DIR)\_sample_.def
-	copy $** $@
-.
-1290d
-1235,1237d
-760c
-dll_ :: $(OBJROOT) $(OBJCPUDIR) $(OBJDIR_DLL) $(OBJDIR_DLL)\$(PURE_OBJ_DIR) \
-   	$(OBJDIR_DLL)\$(CPP_OBJ_DIR) \
-   	$(RELDIR_CPU) $(PDBDIR_CPU_DLL) $(MAKE_DIRS_DLL)
-.
-340c
-CC_OPTS_BASE=-c -nologo -Zlp8 -W3 -GFy -DWIND32
-.
-213d
-21,24c
-RETAIL_DLL_NAME=MOZCRT19
-RETAIL_LIB_NAME=mozcrt19
-RETAIL_DLLCPP_NAME=MOZCPP19
-RETAIL_LIBCPP_NAME=mozcpp19
-.
-diff -re crt/src/makefile.inc crtsrc/makefile.inc
-1636a
-$(OBJDIR)\unhandld.obj: $(PREOBJDIR)\unhandld.obj
-        copy $(PREOBJDIR)\unhandld.obj $@
-
-.
-623d
-621d
-405d
-344,356c
-        $(OBJDIR)\jemalloc.obj  \
-.
-336,337d
-331,332d
-329d
-325d
-321,322d
-diff -re crt/src/makefile.sub crtsrc/makefile.sub
-66c
-CFLAGS=$(CFLAGS) -O2 -DMOZ_MEMORY=1 -DMOZ_MEMORY_WINDOWS=1 -DMOZ_MEMORY_SIZEOF_PTR_2POW=3
-.
-diff -re crt/src/malloc.h crtsrc/malloc.h
-189a
-#endif
-.
-177a
-
-#if 0
-.
-83a
-#endif
-.
-70a
-#if 0
-.
-diff -re crt/src/mlock.c crtsrc/mlock.c
-274c
-#endif
-.
-262a
-#if 0
-.
-diff -re crt/src/new.cpp crtsrc/new.cpp
-60d
-52,55d
-37,38c
-        break;
-.
-diff -re crt/src/nothrownew.cpp crtsrc/nothrownew.cpp
-38c
-#endif
-.
-31a
-#if 1
-        break;
-#else
-
-.
-diff -re crt/src/sample_p.def crtsrc/sample_p.def
-8c
-LIBRARY mozcpp19
-.
-diff -re crt/src/sample_p.rc crtsrc/sample_p.rc
-41c
-            VALUE "ProductName", "Mozilla Custom C++ Runtime"
-.
-39c
-            VALUE "OriginalFilename", "MOZCPP19.DLL"
-.
-37c
-            VALUE "OriginalFilename", "MOZCPP19D.DLL"
-.
-33c
-            VALUE "InternalName", "MOZCPP19.DLL"
-.
-31c
-            VALUE "InternalName", "MOZCPP19D.DLL"
-.
-27c
-            VALUE "CompanyName", "Mozilla Foundation"
-.
-diff -re crt/src/tidtable.c crtsrc/tidtable.c
-360,361d
deleted file mode 100644
--- a/memory/jemalloc/crtvc9sp1-intel.diff
+++ /dev/null
@@ -1,221 +0,0 @@
-# The Microsoft C Runtime source code to which this document refers is available
-# directly from Microsoft Corporation, under a separate license.
-# Please ensure that if you are using that source code, you have appropriate
-# rights to use it.  By providing you access to this file, Mozilla Corporation
-# and its affiliates do not purport to grant any rights in that source code. 
-# Binaries are available under separate licenses at 
-# http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en
-diff -re crt/src/_sample_.rc crtsrc/_sample_.rc
-41c
-            VALUE "ProductName", "Mozilla Custom C Runtime"
-.
-39c
-            VALUE "OriginalFilename", "MOZCRT19.DLL"
-.
-37c
-            VALUE "OriginalFilename", "MOZCRT19D.DLL"
-.
-33c
-            VALUE "InternalName", "MOZCRT19.DLL"
-.
-31c
-            VALUE "InternalName", "MOZCRT19D.DLL"
-.
-27c
-            VALUE "CompanyName", "Mozilla Foundation"
-.
-diff -re crt/src/crt0.c crtsrc/crt0.c
-212c
-        /*
-         * this used to happen in _mtinit, but we need it before malloc
-         */
-        _init_pointers();       /* initialize global function pointers */
-
-        if ( malloc_init_hard() )                /* initialize heap */
-.
-87a
-extern BOOL malloc_init_hard(void);
-.
-diff -re crt/src/crt0dat.c crtsrc/crt0dat.c
-837d
-826d
-diff -re crt/src/crtdll.c crtsrc/crtdll.c
-31,40d
-diff -re crt/src/crtexe.c crtsrc/crtexe.c
-322,324d
-35,45d
-diff -re crt/src/crtheap.c crtsrc/crtheap.c
-61c
-    pv = calloc(count, size);
-.
-58,59d
-diff -re crt/src/crtlib.c crtsrc/crtlib.c
-686,693d
-355d
-339a
-                 malloc_shutdown();
-
-.
-298d
-279d
-249,250d
-239d
-226c
-            /*
-             * this used to happen in _mtinit, but we need it before malloc
-             */
-            _init_pointers();       /* initialize global function pointers */
-
-            if ( malloc_init_hard() )   /* initialize heap */
-.
-43a
-extern BOOL malloc_init_hard(void);
-extern void malloc_shutdown(void);
-
-.
-diff -re crt/src/dllcrt0.c crtsrc/dllcrt0.c
-189,190d
-136d
-126d
-111d
-106,108d
-diff -re crt/src/intel/_sample_.def crtsrc/intel/_sample_.def
-1198d
-718,719d
-664a
-    posix_memalign
-.
-638a
-    memalign
-.
-495a
-    malloc_usable_size
-.
-467a
-    jemalloc_stats
-.
-331,336d
-319d
-313,314d
-81d
-9c
-LIBRARY MOZCRT19
-.
-diff -re crt/src/internal.h crtsrc/internal.h
-413a
-#endif
-.
-409c
-#if 0
-.
-diff -re crt/src/makefile crtsrc/makefile
-1873c
--def:$(DEFFILE2_DIR)\sample_p.def
-.
-1841c
- $(DEFFILE2_DIR)\sample_p.def $(CPPSRC_OBJS_DLL:*=dll) \
-.
-1771a
-$(DEFFILE_DIR)\$(RETAIL_LIB_NAME).def : $(DEFFILE_DIR)\_sample_.def
-	copy $** $@
-.
-1290d
-1235,1237d
-760c
-dll_ :: $(OBJROOT) $(OBJCPUDIR) $(OBJDIR_DLL) $(OBJDIR_DLL)\$(PURE_OBJ_DIR) \
-   	$(OBJDIR_DLL)\$(CPP_OBJ_DIR) \
-   	$(RELDIR_CPU) $(PDBDIR_CPU_DLL) $(MAKE_DIRS_DLL)
-.
-340c
-CC_OPTS_BASE=-c -nologo -Zlp8 -W3 -GFy -DWIND32
-.
-213d
-21,24c
-RETAIL_DLL_NAME=MOZCRT19
-RETAIL_LIB_NAME=mozcrt19
-RETAIL_DLLCPP_NAME=MOZCPP19
-RETAIL_LIBCPP_NAME=mozcpp19
-.
-diff -re crt/src/makefile.inc crtsrc/makefile.inc
-1636a
-$(OBJDIR)\unhandld.obj: $(PREOBJDIR)\unhandld.obj
-        copy $(PREOBJDIR)\unhandld.obj $@
-
-.
-623d
-621d
-405d
-344,356c
-        $(OBJDIR)\jemalloc.obj  \
-.
-336,337d
-331,332d
-329d
-325d
-321,322d
-diff -re crt/src/makefile.sub crtsrc/makefile.sub
-66c
-CFLAGS=$(CFLAGS) -O2 -DMOZ_MEMORY=1 -DMOZ_MEMORY_WINDOWS=1
-.
-diff -re crt/src/malloc.h crtsrc/malloc.h
-189a
-#endif
-.
-177a
-
-#if 0
-.
-83a
-#endif
-.
-70a
-#if 0
-.
-diff -re crt/src/mlock.c crtsrc/mlock.c
-274c
-#endif
-.
-262a
-#if 0
-.
-diff -re crt/src/new.cpp crtsrc/new.cpp
-60d
-52,55d
-37,38c
-        break;
-.
-diff -re crt/src/nothrownew.cpp crtsrc/nothrownew.cpp
-38c
-#endif
-.
-31a
-#if 1
-        break;
-#else
-
-.
-diff -re crt/src/sample_p.def crtsrc/sample_p.def
-8c
-LIBRARY mozcpp19
-.
-diff -re crt/src/sample_p.rc crtsrc/sample_p.rc
-41c
-            VALUE "ProductName", "Mozilla Custom C++ Runtime"
-.
-39c
-            VALUE "OriginalFilename", "MOZCPP19.DLL"
-.
-37c
-            VALUE "OriginalFilename", "MOZCPP19D.DLL"
-.
-33c
-            VALUE "InternalName", "MOZCPP19.DLL"
-.
-31c
-            VALUE "InternalName", "MOZCPP19D.DLL"
-.
-27c
-            VALUE "CompanyName", "Mozilla Foundation"
-.
-diff -re crt/src/tidtable.c crtsrc/tidtable.c
-360,361d
deleted file mode 100755
index fc812ea2dbbfe486643cf38a8f6ee68886e24819..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/memory/jemalloc/jemalloc.c
+++ b/memory/jemalloc/jemalloc.c
@@ -198,27 +198,19 @@
 #include <stdlib.h>
 #include <limits.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <string.h>
 
 #ifdef MOZ_MEMORY_WINDOWS
 
-/* XXXkhuey switch to not patching the CRT for jemalloc all the time */
-/* We use ifndef NEW_STYLE here because when we're build as part of the CRT
-   we don't have access to AC_DEFINEs */
-#ifndef WIN32_NEW_STYLE_JEMALLOC
-#include <cruntime.h>
-#include <internal.h>
-#else
 /* Some defines from the CRT internal headers that we need here. */
 #define _CRT_SPINCOUNT 5000
 #define __crtInitCritSecAndSpinCount InitializeCriticalSectionAndSpinCount
-#endif
 #include <io.h>
 #include <windows.h>
 
 #pragma warning( disable: 4267 4996 4146 )
 
 #define	bool BOOL
 #define	false FALSE
 #define	true TRUE
@@ -5844,20 +5836,20 @@ malloc_shutdown()
 /*
  * Begin malloc(3)-compatible functions.
  */
 
 /*
  * Mangle standard interfaces, in order to avoid linking problems.
  */
 #if defined(MOZ_MEMORY_DARWIN) || defined(MOZ_MEMORY_ANDROID) || \
-    defined(WRAP_MALLOC) || defined(WIN32_NEW_STYLE_JEMALLOC)
+    defined(WRAP_MALLOC) || defined(MOZ_MEMORY_WINDOWS)
 inline void sys_free(void* ptr) {return free(ptr);}
 #define	malloc(a)               je_malloc(a)
-#if defined(WIN32_NEW_STYLE_JEMALLOC) || defined(MOZ_MEMORY_DARWIN)
+#if defined(MOZ_MEMORY_WINDOWS) || defined(MOZ_MEMORY_DARWIN)
 #define	memalign(a, b)          je_memalign(a, b)
 #endif
 #define	posix_memalign(a, b, c) je_posix_memalign(a, b, c)
 #define	valloc(a)               je_valloc(a)
 #define	calloc(a, b)            je_calloc(a, b)
 #define	realloc(a, b)           je_realloc(a, b)
 #define	free(a)                 je_free(a)
 #define	malloc_usable_size(a)   je_malloc_usable_size(a)
@@ -6790,17 +6782,17 @@ void *(*__memalign_hook)(size_t alignmen
 /*
  * XXX On systems that support RTLD_GROUP or DF_1_GROUP, do their
  * implementations permit similar inconsistencies?  Should STV_SINGLETON
  * visibility be used for interposition where available?
  */
 #  error "Interposing malloc is unsafe on this system without libc malloc hooks."
 #endif
 
-#ifdef WIN32_NEW_STYLE_JEMALLOC
+#ifdef MOZ_MEMORY_WINDOWS
 /*
  * In the new style jemalloc integration jemalloc is built as a separate
  * shared library.  Since we're no longer hooking into the CRT binary,
  * we need to initialize the heap at the first opportunity we get.
  * DLL_PROCESS_ATTACH in DllMain is that opportunity.
  */
 BOOL APIENTRY DllMain(HINSTANCE hModule, 
                       DWORD reason, 
--- a/memory/jemalloc/jemalloc.h
+++ b/memory/jemalloc/jemalloc.h
@@ -46,17 +46,17 @@ void	*malloc(size_t size);
 void	*valloc(size_t size);
 void	*calloc(size_t num, size_t size);
 void	*realloc(void *ptr, size_t size);
 void	free(void *ptr);
 int	posix_memalign(void **memptr, size_t alignment, size_t size);
 #endif /* MOZ_MEMORY_DARWIN, MOZ_MEMORY_LINUX */
 
 #if defined(MOZ_MEMORY_DARWIN) || defined(MOZ_MEMORY_ANDROID) || \
-    defined(WRAP_MALLOC) || defined(WIN32_NEW_STYLE_JEMALLOC)
+    defined(WRAP_MALLOC) || defined(MOZ_MEMORY_WINDOWS)
 void	*je_malloc(size_t size);
 void	*je_valloc(size_t size);
 void	*je_calloc(size_t num, size_t size);
 void	*je_realloc(void *ptr, size_t size);
 void	je_free(void *ptr);
 void *je_memalign(size_t alignment, size_t size);
 int	je_posix_memalign(void **memptr, size_t alignment, size_t size);
 char    *je_strndup(const char *src, size_t len);
--- a/mobile/installer/Makefile.in
+++ b/mobile/installer/Makefile.in
@@ -73,20 +73,16 @@ JAREXT=.jar
 else
 JAREXT=
 endif
 DEFINES += -DJAREXT=$(JAREXT)
 
 include $(topsrcdir)/ipc/app/defs.mk
 DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME)
 
-ifdef WIN32_OLD_STYLE_JEMALLOC
-DEFINES += -DWIN32_OLD_STYLE_JEMALLOC=1
-endif
-
 ifdef MOZ_PKG_MANIFEST_P
 MOZ_PKG_MANIFEST = package-manifest
 endif
 
 MOZ_POST_STAGING_CMD = find chrome -type f -name *.properties -exec sed -i '/^\#/d' {} \;
 
 include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
 
--- a/mobile/installer/package-manifest.in
+++ b/mobile/installer/package-manifest.in
@@ -53,20 +53,16 @@
 @BINPATH@/@DLL_PREFIX@xul@DLL_SUFFIX@
 #endif
 #ifdef XP_MACOSX
 @BINPATH@/@MOZ_CHILD_PROCESS_NAME@.app/
 #else
 @BINPATH@/@MOZ_CHILD_PROCESS_NAME@
 #endif
 #ifdef XP_WIN32
-#ifdef WIN32_OLD_STYLE_JEMALLOC
-@BINPATH@/mozcrt19.dll
-@BINPATH@/mozcpp19.dll
-#else
 #ifdef MOZ_MEMORY
 @BINPATH@/jemalloc.dll
 #endif
 #if _MSC_VER == 1400
 @BINPATH@/Microsoft.VC80.CRT.manifest
 @BINPATH@/msvcm80.dll
 @BINPATH@/msvcp80.dll
 @BINPATH@/msvcr80.dll
@@ -74,17 +70,16 @@
 @BINPATH@/Microsoft.VC90.CRT.manifest
 @BINPATH@/msvcm90.dll
 @BINPATH@/msvcp90.dll
 @BINPATH@/msvcr90.dll
 #elif _MSC_VER == 1600
 @BINPATH@/msvcp100.dll
 @BINPATH@/msvcr100.dll
 #endif
-#endif
 
 #endif
 
 #ifdef ANDROID
 @BINPATH@/AndroidManifest.xml
 @BINPATH@/resources.arsc
 @BINPATH@/classes.dex
 @BINPATH@/@DLL_PREFIX@mozutils@DLL_SUFFIX@
--- a/mobile/installer/removed-files.in
+++ b/mobile/installer/removed-files.in
@@ -1,15 +1,8 @@
 README.txt
 #if MOZ_UPDATE_CHANNEL != beta
 extensions/feedback@mobile.mozilla.org.xpi
 #endif
 #ifdef XP_WIN
-  #ifdef WIN32_OLD_STYLE_JEMALLOC
-    Microsoft.VC80.CRT.manifest
-    msvcm80.dll
-    msvcp80.dll
-    msvcr80.dll
-  #else
-    mozcrt19.dll
-    mozcpp19.dll
-  #endif
+  mozcrt19.dll
+  mozcpp19.dll
 #endif
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -85,34 +85,30 @@ SDK           = $(SDK_PATH)$(PKG_BASENAM
 # JavaScript Shell packaging
 ifndef LIBXUL_SDK
 JSSHELL_BINS  = \
   $(DIST)/bin/js$(BIN_SUFFIX) \
   $(NULL)
 ifndef MOZ_NATIVE_NSPR
 JSSHELL_BINS += $(DIST)/bin/$(LIB_PREFIX)nspr4$(DLL_SUFFIX)
 ifeq ($(OS_ARCH),WINNT)
-ifdef WIN32_OLD_STYLE_JEMALLOC
-JSSHELL_BINS += $(DIST)/bin/mozcrt19$(DLL_SUFFIX)
-else
 ifdef MOZ_MEMORY
 JSSHELL_BINS += $(DIST)/bin/jemalloc$(DLL_SUFFIX)
 endif
 ifeq ($(_MSC_VER),1400)
 JSSHELL_BINS += $(DIST)/bin/Microsoft.VC80.CRT.manifest
 JSSHELL_BINS += $(DIST)/bin/msvcr80.dll
 endif
 ifeq ($(_MSC_VER),1500)
 JSSHELL_BINS += $(DIST)/bin/Microsoft.VC90.CRT.manifest
 JSSHELL_BINS += $(DIST)/bin/msvcr90.dll
 endif
 ifeq ($(_MSC_VER),1500)
 JSSHELL_BINS += $(DIST)/bin/msvcr100.dll
 endif
-endif
 else
 JSSHELL_BINS += \
   $(DIST)/bin/$(LIB_PREFIX)plds4$(DLL_SUFFIX) \
   $(DIST)/bin/$(LIB_PREFIX)plc4$(DLL_SUFFIX) \
   $(NULL)
 endif
 endif # MOZ_NATIVE_NSPR
 MAKE_JSSHELL  = $(ZIP) -9j $(PKG_JSSHELL) $(JSSHELL_BINS)