mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1418104 - Initialize the allocator in jemalloc_stats. r=njn
Some unit tests rely on jemalloc_stats to get information such as chunk size or page size. They can do so before any allocation happens, when using gtest filters. So it is preferable for jemalloc_stats to initialize the allocator. --HG-- extra : rebase_source : 6696ec1cdaa3b121a3d12cb7b6049b79c656d271
This commit is contained in:
parent
818f7e1ab6
commit
c4587b9a17
@ -4470,7 +4470,7 @@ MozJemalloc::jemalloc_stats(jemalloc_stats_t* aStats)
|
||||
if (!aStats) {
|
||||
return;
|
||||
}
|
||||
if (!malloc_initialized) {
|
||||
if (!malloc_init()) {
|
||||
memset(aStats, 0, sizeof(*aStats));
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user