标签:
1. 确定dylib在max os是可以成功的。
http://lists.apple.com/archives/perfoptimization-dev/2008/Dec/msg00002.html
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:
http://groups.google.com/group/google-perftools
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).
Good luck!
2.
http://liam.flookes.com/wp/2012/05/03/finding-ios-memory/
标签:
原文地址:http://www.cnblogs.com/wiessharling/p/4685475.html