ivmai / bdwgc

The Boehm-Demers-Weiser conservative C/C++ Garbage Collector (bdwgc, also known as bdw-gc, boehm-gc, libgc)
https://www.hboehm.info/gc/
Other
3.01k stars 407 forks source link

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

Open ivmai opened 1 month ago

ivmai commented 1 month ago

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 commented 1 month ago

So, there could be 3 options of bdwgc build: