GCC's default visibility is "public" but can be changed to
"hidden" with the argument "-fvisibility=hidden".
Tested with x86_64 / Ubuntu Linux 18.04 LTS:
[before]
$ nm -g -C libmimalloc.so | grep "T " | wc -l
142
[after]
$ nm -g -C libmimalloc.so | grep "T " | wc -l
93
This patch does not change the build on macOS.
In 2012, with the release of OS X 10.8 Mountain Lion, the name of the
system was shortened from Mac OS X to OS X. In 2016, with the release
of macOS 10.12 Sierra, the name was changed from OS X to macOS to
streamline it with the branding of Apple's other primary operating
systems: iOS, watchOS, and tvOS.
Reference: https://en.wikipedia.org/wiki/MacOS