tcmalloc资料

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.

A look at how malloc works on the Mac

http://www.cocoawithlove.com/2010/05/look-at-how-malloc-works-on-mac.html

 

Finding iOS memory

http://liam.flookes.com/wp/2012/05/03/finding-ios-memory/

 

3. 查动态链接库是在什么平台下编译出来的。

lipo -info libtcmalloc.dylib

Non-fat file: libtcmalloc.dylib is architecture: x86_64

posted @ 2015-07-29 11:33  wiessharling  阅读(300)  评论(0编辑  收藏  举报