Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jemalloc-sys always builds jemalloc with stats enabled regardless of the stats cargo feature #160

Open
rocallahan opened this issue Sep 30, 2020 · 1 comment · May be fixed by #161
Open

Comments

@rocallahan
Copy link

The jemalloc checkout included in jemalloc-sys has, in configure.ac:

dnl Enable statistics calculation by default.
AC_ARG_ENABLE([stats],
  [AS_HELP_STRING([--disable-stats],
                  [Disable statistics calculation/reporting])],
[if test "x$enable_stats" = "xno" ; then
  enable_stats="0"
else
  enable_stats="1"
fi
],
[enable_stats="1"]
)
if test "x$enable_stats" = "x1" ; then
  AC_DEFINE([JEMALLOC_STATS], [ ])
fi
AC_SUBST([enable_stats])

but jemalloc-sys build.rs has

    if env::var("CARGO_FEATURE_STATS").is_ok() {
        info!("CARGO_FEATURE_STATS set");
        cmd.arg("--enable-stats");
    }

So stats are always enabled in the jemalloc build.

@rocallahan
Copy link
Author

Seems unfortunate that every Rust user of jemalloc has stats enabled when that is not the intended default. I'll send a PR.

rocallahan added a commit to Pernosco/jemallocator that referenced this issue Sep 30, 2020
…void depending on jemalloc defaults (which could change)

Resolves gnzlbg#160
@rocallahan rocallahan linked a pull request Sep 30, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant