mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-05 19:27:32 +03:00
Use nallocx() rather than mallctl() to trigger initialization.
Use nallocx() rather than mallctl() to trigger initialization, because nallocx() has no side effects other than initialization, whereas mallctl() does a bunch of internal memory allocation.
This commit is contained in:
parent
26f44df742
commit
99118622ff
1 changed files with 1 additions and 1 deletions
|
|
@ -73,7 +73,7 @@ p_test(test_t *t, ...)
|
|||
* is a final safety that works even if jemalloc_constructor() doesn't
|
||||
* run, as for MSVC builds.
|
||||
*/
|
||||
if (mallctl("version", NULL, NULL, NULL, 0) != 0) {
|
||||
if (nallocx(1, 0) == 0) {
|
||||
malloc_printf("Initialization error");
|
||||
return (test_status_fail);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue