Bug 1181142 - Part 2: Make the minimum jemalloc4 allocation size 16 bytes on Windows 64. r=glandium
authorEric Rahm <erahm@mozilla.com>
Thu, 24 Mar 2016 16:26:29 -0700
changeset 291041 0a14d675236ec1f37d1251b7e9ea5f9aa2aea35e
parent 291040 45c01e7fbe3fb034e0a2b5bfb6a6a745b19497ff
child 291042 e8cd4e639e410abc015b6c4211059e700a39c9c3
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1181142
milestone48.0a1
Bug 1181142 - Part 2: Make the minimum jemalloc4 allocation size 16 bytes on Windows 64. r=glandium
build/autoconf/jemalloc.m4
--- a/build/autoconf/jemalloc.m4
+++ b/build/autoconf/jemalloc.m4
@@ -29,16 +29,21 @@ if test "$MOZ_BUILD_APP" != js -o -n "$J
           # See memory/build/mozmemory_wrap.h for details.
           ac_configure_args="$ac_configure_args --without-export"
           ;;
       esac
       if test "${OS_ARCH}" = WINNT; then
         # Lazy lock initialization doesn't play well with lazy linking of
         # mozglue.dll on Windows XP (leads to startup crash), so disable it.
         ac_configure_args="$ac_configure_args --disable-lazy-lock"
+
+        # 64-bit Windows builds require a minimum 16-byte alignment.
+        if test -n "$HAVE_64BIT_BUILD"; then
+          ac_configure_args="$ac_configure_args --with-lg-tiny-min=4"
+        fi
       fi
     elif test "${OS_ARCH}" = Darwin; then
       # When building as a replace-malloc lib, disabling the zone allocator
       # forces to use pthread_atfork.
       ac_configure_args="$ac_configure_args --disable-zone-allocator"
     fi
     _MANGLE="malloc posix_memalign aligned_alloc calloc realloc free memalign valloc malloc_usable_size"
     JEMALLOC_WRAPPER=