We have a assembly provided to us by a third-party that leaks memory when using the boehm GC for mono, but that does not leak when using the S-Gen GC.
When we start the program, we want to warn the user if he’s using the “wrong” GC, and to do that we need to detect which one is used.
Is there an API to detect this?
There isn’t a specific API, but you can use GC.MaxGeneratio: when using the Boehm GC it will be 0 and higher with the sgen GC.