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

fix: only use jemalloc on linux #459

Merged
merged 1 commit into from
Jan 29, 2025
Merged

fix: only use jemalloc on linux #459

merged 1 commit into from
Jan 29, 2025

Conversation

tobz
Copy link
Member

@tobz tobz commented Jan 29, 2025

Summary

When running ADP on macOS, it would immediately crash due to an error coming from jemalloc:

<jemalloc>: No THP support: thp:never
<jemalloc>: Abort (abort_conf:true) on invalid conf value (see above).

We previously disabled THP support in jemalloc to deal with ballooning RSS but, seemingly, jemalloc considers it a completely invalid configuration when on macOS instead of just ignoring, thus the abort.

This PR simply moves our usage of jemalloc to be gated behind #[cfg(target_os = "linux")]. In the future, it'd be nice to just adjust our compile-time jemalloc configuration string for macOS to not include the thp:never bit, but the Cargo configuration file schema doesn't support per-target environment variables, so we don't have an easy way to do so... yet, at least.

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

How did you test this PR?

Built ADP locally on both macOS and Linux and ensured they ran correctly without throwing an error at startup.

References

N/A

@tobz tobz marked this pull request as ready for review January 29, 2025 13:48
@tobz tobz requested a review from a team as a code owner January 29, 2025 13:48
@tobz tobz merged commit b56bdcd into main Jan 29, 2025
21 checks passed
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 this pull request may close these issues.

1 participant