#982 TCMalloc
open
nobody
None
5
2015-03-07
2015-03-01
No
Discussion
Log in to post a comment.
×
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
malloc/freeに対応していないところを元に戻しました。
new/deleteには対応しないのでしょうか?
ほとんどの主要メモリ管理はnewなのであまり意味がないようなきがします。
たしかデバック用のnewのオーバーロードがあったと思うので、それをちょろっといじれば使えないでしょうか。
"build_config.h"にあったので調べてみます。
意味がないかも?の件ですが、
メモリバッファクラス(CMemory)でmalloc/freeを使っているので効果があるかなと思ってました。
コンパイルしたもの(ANSI/64bit(x64)版)を使っていますが、違いはよくわからないです。
ソースコード変更不要でした。
プロジェクトファイルの変更だけで対応できます。
詳細は「README_windows.txt」に記載されています。
https://github.com/gperftools/gperftools/blob/master/README_windows.txt
■TCMalloc側(libtcmalloc_minimal)
・Configuration Type
「Static Library (.lib)」を設定
・Preprocessor Definitions
「PERFTOOLS_DLL_DECL=」を設定
・Runtime Library
「Multi-threaded Debug(/MD)」または「Multi-threaded (/MT)」を設定
■サクラエディタ側
・Additional Dependencies
「libtcmalloc_minimal.lib」を追加
・Force Symbol References
「__tcmalloc」を追加
上記設定で、new/delete、malloc/freeの呼び出しがTCMallocに切り替わります。
この件は、closeしたいと思います。
Last edit: novice123 2015-11-08