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

Turn on support of redirect-malloc by default at bdwgc build #665

Open
ivmai opened this issue Oct 3, 2024 · 1 comment
Open

Turn on support of redirect-malloc by default at bdwgc build #665

ivmai opened this issue Oct 3, 2024 · 1 comment

Comments

@ivmai
Copy link
Owner

ivmai commented Oct 3, 2024

It would be convenient (especially in downstream packages) to have a unified libgc build which could be used both by client requesting malloc redirection and not.
E.g. in case of a shared build, we could provide a separated proxy library, e.g. libgcredirect (which just redirect malloc to GC_redirected_malloc, etc.), and the client would use -lgcredirect if he really needs malloc redirection.

To turn off this feature, we could add new build option, e.g.: --disable-on-demand-redirect-malloc

@ivmai
Copy link
Owner Author

ivmai commented Oct 3, 2024

So, there could be 3 options of bdwgc build:

  • no malloc redirect support (the default now)
  • malloc() is exported from libgc.so (this is now if --enable-redirect-malloc)
  • malloc() will be exported from libgcredirect.so, GC_redirected_malloc() will be exported from libgc.so (this will be by default after the feature is implemented)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant