Skip to content

Commit

Permalink
servo: Merge #18944 - Stop relying on linking details of std’s defaul…
Browse files Browse the repository at this point in the history
…t allocator (from servo:jemallocator2); r=nox

We’ve been bitten before by symbol names changing: servo/heapsize#46, and upstream is planning to stop using jemalloc by default: rust-lang/rust#33082 (comment)

So use the (relatively) new `#[global_allocator]` attribute to explicitly select the system allocator on Windows and jemalloc (now in an external crate) on other platforms. This choice matches current defaults.

Source-Repo: https://github.com/servo/servo
Source-Revision: 07e9794306d597afe5d90d192fd32a99572c3cc3

UltraBlame original commit: 921526150768f9a2e9ba1586a350583f9ad025c9
  • Loading branch information
marco-c committed Oct 2, 2019
1 parent a35596e commit 38f9fa3
Show file tree
Hide file tree
Showing 20 changed files with 1,248 additions and 458 deletions.
459 changes: 428 additions & 31 deletions servo/Cargo.lock

Large diffs are not rendered by default.

125 changes: 125 additions & 0 deletions servo/components/allocator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
[
package
]
name
=
"
servo_allocator
"
version
=
"
0
.
0
.
1
"
authors
=
[
"
The
Servo
Project
Developers
"
]
license
=
"
MPL
-
2
.
0
"
publish
=
false
[
lib
]
path
=
"
lib
.
rs
"
[
features
]
unstable
=
[
"
kernel32
-
sys
"
"
jemallocator
"
]
[
target
.
'
cfg
(
not
(
windows
)
)
'
.
dependencies
]
jemallocator
=
{
version
=
"
0
.
1
.
3
"
optional
=
true
}
[
target
.
'
cfg
(
windows
)
'
.
dependencies
]
kernel32
-
sys
=
{
version
=
"
0
.
2
.
1
"
optional
=
true
}
Loading

0 comments on commit 38f9fa3

Please sign in to comment.