私はネットワークベースのアプリケーションに取り組んでいます。初期化とリリースの間のメモリ使用量や送信と受信の間のメモリ使用量など、アプリケーションのさまざまな段階間のメモリ使用量を確認したいと思います。私はグーグルで解決策を見つけようとしましたが、私の要件に完全に一致する投稿はありません。
LinuxとWindowsプラットフォームの両方でチェックポイントベースのメモリプロファイリングを実行するのに役立つツールやプロセスを提案してください。
前もって感謝します
次のコード
_CrtMemState memState1;
_CrtMemCheckpoint(&memState1);
char *p = new char[100];
p = new char[100];
p = new char[100];
p = new char[100];
p = new char[100];
_CrtMemState memState2;
_CrtMemCheckpoint(&memState2);
_CrtMemState memStateDiff;
_CrtMemDifference(&memStateDiff, &memState1, &memState2);
_CrtMemDumpStatistics(&memStateDiff);'
出力をくれます
0 bytes in 0 Free Blocks.
0 bytes in 0 Normal Blocks.
0 bytes in 0 CRT Blocks.
0 bytes in 0 Ignore Blocks.
0 bytes in 0 Client Blocks.
Largest number used: 0 bytes.
Total allocations: 0 bytes.
Windows7UltimateでVisualStudio2010Professionalを使用しています。