タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

debugとvalgrindに関するnilabのブックマーク (2)

  • メモリーリークの検出:mtrace , valgrind:プログラマー社長のブログ:オルタナティブ・ブログ

    以前の記事にもLinuxでのメモリーリークの検出に関する事を書いたのですが、もう少し一般的なやり方を紹介しましょう(というより、自分で毎回忘れるので備忘録として・・・)。 【mtraceを使う方法】 まず、mtraceを使う方法です。リークのテストを開始したい場所でmtrace()をコールし、終了したい場所でmuntrace()をコールするようにします。 #include        <stdio.h> #include        <stdlib.h> char *test() { char    *test=malloc(10); return(test); } int main() { char    *ptr; mtrace(); ptr=test(); //*(ptr+10)='\0'; //free(ptr); muntrace(); return(0); } -gつきでコ

    メモリーリークの検出:mtrace , valgrind:プログラマー社長のブログ:オルタナティブ・ブログ
    nilab
    nilab 2010/06/11
    メモリーリークの検出:mtrace , valgrind:プログラマー社長のブログ:ITmedia オルタナティブ・ブログ
  • Valgrind Home

    Information About News Tool Suite Supported Platforms The Developers Source Code Current Releases Release Archive Variants / Patches Code Repository Valkyrie / GUIs Documentation Table of Contents Quick Start FAQ User Manual Download Manual Research Papers Books Contact Mailing Lists and IRC Bug Reports Feature Requests Contact Summary Commercial Support How to Help Contributing Project Suggestion

    nilab
    nilab 2010/05/27
    Valgrind Home : 「Valgrind is an award-winning instrumentation framework for building dynamic analysis tools. There are Valgrind tools that can automatically detect many memory management and threading bugs, and profile your programs in detail. You can also use Valgrind to build new tools. 」
  • 1