Bug 719579 - Force SQLite to use malloc_usable_size when jemalloc is used.
authorMarco Bonardo <mbonardo@mozilla.com>
Tue, 24 Jan 2012 13:41:32 +0100
changeset 86443 65126f431e53e1eadc66c1e4e6dfacf7796f6f60
parent 86442 92b6a058907f028442db6d32a3d1c4ede077b488
child 86444 a60f021bab003ce65863c84cda423673f1c73e8f
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs719579
milestone12.0a1
Bug 719579 - Force SQLite to use malloc_usable_size when jemalloc is used. r=sdwilsh
db/sqlite3/src/Makefile.in
--- a/db/sqlite3/src/Makefile.in
+++ b/db/sqlite3/src/Makefile.in
@@ -140,16 +140,24 @@ DEFINES += -DOS2_HIGH_MEMORY
 endif
 endif
 
 ifeq ($(OS_TARGET),Android)
 # default to user readable only to fit Android security model
 DEFINES += -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600
 endif
 
+# Force using malloc_usable_size when building with jemalloc because _msize
+# causes assertions on Win64. See bug 719579.
+ifeq ($(OS_ARCH),WINNT)
+ifdef MOZ_MEMORY
+DEFINES += -DHAVE_MALLOC_USABLE_SIZE
+endif
+endif
+
 include $(topsrcdir)/config/rules.mk
 
 # next line allows use of MOZ_OBJDIR in .mozconfig with older gcc on BeOS, maybe others
 LOCAL_INCLUDES += -I$(srcdir)
 
 ifeq ($(OS_ARCH),OS2)
 ADD_TO_DEF_FILE = $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) \
        $(srcdir)/sqlite.def | sed -e '1,/^EXPORTS$$/ d' -e 's,sqlite3,_\0,' \