Skip to content

Commit

Permalink
Auto merge of #41861 - arthurprs:update-jemalloc, r=alexcrichton
Browse files Browse the repository at this point in the history
Update jemalloc to 4.5.0

* pointing jemalloc submodule to the 4.5.0 HEAD + generated configure script
* removed the now unnecessary extra config for windows. jemalloc is now much better at configuring itself overall.

Let's see what the CI think.
  • Loading branch information
bors committed May 13, 2017
2 parents 4f3886a + 65d0be3 commit 453cad6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/jemalloc
Submodule jemalloc updated 145 files
24 changes: 1 addition & 23 deletions src/liballoc_jemalloc/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,29 +93,7 @@ fn main() {
.env("AR", &ar)
.env("RANLIB", format!("{} s", ar.display()));

if target.contains("windows") {
// A bit of history here, this used to be --enable-lazy-lock added in
// #14006 which was filed with jemalloc in jemalloc/jemalloc#83 which
// was also reported to MinGW:
//
// http://sourceforge.net/p/mingw-w64/bugs/395/
//
// When updating jemalloc to 4.0, however, it was found that binaries
// would exit with the status code STATUS_RESOURCE_NOT_OWNED indicating
// that a thread was unlocking a mutex it never locked. Disabling this
// "lazy lock" option seems to fix the issue, but it was enabled by
// default for MinGW targets in 13473c7 for jemalloc.
//
// As a result of all that, force disabling lazy lock on Windows, and
// after reading some code it at least *appears* that the initialization
// of mutexes is otherwise ok in jemalloc, so shouldn't cause problems
// hopefully...
//
// tl;dr: make windows behave like other platforms by disabling lazy
// locking, but requires passing an option due to a historical
// default with jemalloc.
cmd.arg("--disable-lazy-lock");
} else if target.contains("ios") {
if target.contains("ios") {
cmd.arg("--disable-tls");
} else if target.contains("android") {
// We force android to have prefixed symbols because apparently
Expand Down

0 comments on commit 453cad6

Please sign in to comment.