1. 确定dylib在max os是可以成功的。
We've been using tcmalloc with good results. We build our app to link with the dylib and have modified the dylib such that it's installation path is set to "@executable_path/../Frameworks/...". I haven't tried using the static library or using the DYLD_FORCE_FLAT_NAMESPACE & DYLD_INSERT_LIBRARIES method. Fortunately we don't have any issues with memory being allocated by a library or plugin that we need to free later (or at least we don't have any that I've found yet ;-) ).
If you do need the performance and want to get around Mac OS X's abysmal malloc bottlenecks then tcmalloc is a good choice if you can get it to work.
You might also try asking the people on the google-perftools group:
They should at least be more familiar with these types of issues and might have workarounds or solutions. There was some mention on that list recently where they said that they think they can detect when a pointer was malloced by the system and then use the system's free() to free it. They said there was a possibility of this feature appearing in one of the next releases of tcmalloc:
http://groups.google.com/group/google-perftools/browse_thread/thread/5530838b6ca7912b# (see the last couple of posts).
A look at how malloc works on the Mac
Finding iOS memory
lipo -info libtcmalloc.dylib
Non-fat file: libtcmalloc.dylib is architecture: x86_64