メモリデバッガ

メモリデバッガ: memory debugger)とは、動的メモリの確保や開放により生じるメモリリークバッファオーバーランなどのバグを探し出すためのプログラミングツールである。マネージコードなどのガベージコレクションを備えた言語で記述されたプログラムでも、たとえばコレクションに格納されたままのリファレンスによるメモリリークといった問題が存在するためメモリデバッガが必要な場合がある。

メモリデバッガツール

下のリストはメモリデバッグを行う際有用なツールやライブラリの一覧である。プロファイラをメモリデバッガと併用する場合もある。

ツール名 OS ライセンス 対象言語 技術
AddressSanitizer(英語版) Linux, Mac OS Free/open source C, C++. Compile-time instrumentation (ClangGCCで有効) and specialized library
Allinea DDT(英語版) Linux, Blue Gene Proprietary commercial C, C++, F90. またはスーパーコンピュータ上の並列プログラム Runtime - through dynamic linking
ANTIC
AQtime(英語版) Windows (Visual Studio, Embarcadero IDEs) Proprietary commercial .NET, C++, Java, Silverlight, JScript, VBScript[1] Runtime
Bcheck(英語版) Solaris
BoundsChecker(英語版) Windows (Visual Studio) Proprietary commercial C++ Runtime intercepts or compile-time
Daikon(英語版) Unix, Windows, Mac OS X[2] Free/open source[3] Java, C/C++, Perl, and Eiffel[2] Runtime dynamic invariant detection
Debug_new(英語版) (一般的なテクニック) (一般的なテクニック) C++ Compile-time override
DebugDiag Windows
Deleaker Windows Proprietary commercial C++
dmalloc(英語版) Any Free/open source C Compile-time override
Dr. Memory(英語版) Android, Linux, Windows Free/open source (LGPL and BSD) Any Runtime intercepts
Electric Fence(英語版) Unix Free/open source (GPL) C, C++ Compile-time override
FASTMM4 Windows Free/open source (GPL) Delphi Compile-time override
Fortify
IBM Rational Purify(英語版) Unix, Windows Proprietary commercial C++, Java, .NET Runtime
Insure++(英語版) Windows (Visual Studio plugin), Unix Proprietary commercial C, C++ source code instrumentation
Intel Inspector(英語版) Windows (Visual Studio) Proprietary commercial C, C++
libcwd(英語版) Linux (gcc) Free/open source C, C++ Compile-time override
libumem(英語版) Solaris Bundled with Solaris Link-time override
MemCheck(英語版)
Memwatch(英語版) いろいろ (programming library) Free/open source C Compile-time override
mpatrol memory handling library Free/open source (LGPL)
mtrace(英語版) いろいろ Free/open source (LGPL) GNU C library Built-in, outputs accesses
MTuner(英語版) いろいろ Free C, C++ Runtime intercepts, Link-time override (MSVC, Clang and GCC), Leak detection
Mudflap Linux (gcc) Free/open source C, C++ Compile-time override (GCC 4.9で削除されAddressSanitizerに置き換わった)
Oracle Solaris Studio (formerly Sun Studio Runtime Checking) Linux, Solaris Proprietary freeware C, C++, Fortran
TotalView / MemoryScape Unix, Mac OS X Proprietary commercial C, C++, Fortran Runtime
Valgrind § Memcheck Linux, Mac OS, Android Free/open source (GPL) 任意 Runtime intercepts
Visual Leak Detector Windows (Visual Studio) Free/open source (LGPL) C, C++
WinDbg(英語版) Windows Proprietary freeware C, C++, .NET, Python Runtime
YAMD Linux, DJGPP

脚注

[脚注の使い方]
  1. ^ http://smartbear.com/products/qa-tools/application-performance-profiling/profiling-managed-code
  2. ^ a b http://groups.csail.mit.edu/pag/daikon/download/doc/daikon.html
  3. ^ http://groups.csail.mit.edu/pag/daikon/download/doc/daikon.html#License

関連項目

参考文献

  • Michael C. Daconta: C++ Pointers and Dynamic Memory Management, John Wiley & Sons, ISBN 0-471-04998-0
  • Andrew Koenig: C Traps and Pitfalls, Addison-Wesley, ISBN 0-201-17928-8

外部リンク

  • "Hunting Memory Bugs" by Ivan Skytte Jorgensen