• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            posts - 34,  comments - 5,  trackbacks - 0

            I hate crashes that disappear when run under the debugger and I had one when
            porting mupdf to Windows.

            It helps to know that there’s at least one reason for a changed behavior under
            the debugger: it automatically triggers using debugging heap. While debugging
            heap usually helps find problems, sometimes it does the opposite by changing
            the details of memory allocation.

            One helpful tool when debugging memory problems on Windows is gflags which can
            enable page heap instrumentation for a given program. It works by putting each
            allocation into a separate region of memory and putting a non-readable page
            right after that. Also, upon freeing it makes the memory unreadable. That way
            an overwrite of memory block while it’s still being used or accessing the
            memory after it was freed will cause immediate crash.

            The downside is that using gflags uses much more memory. But in those days of
            cheap gigabytes it’s not a problem that can’t be solved with a couple hundred
            bucks.

            Basic usage of gflags.exe is simple:
            gflags /p /full /enable foo.exe

            From now on foo.exe will always be run with this instrumentation turned on. To
            disable, do
            gflags /p /disable foo.exe

            To see which programs have page heap enabled, do gflags /p. gflags offers many
            other option and you can learn about them via gflags /?. If you run gflags
            without any options, you’ll get a (very confusing) GUI.

            It worked like a charm. I got a crash on accessing freed memory and all I had
            to do was to backtrack to where this memory was allocated to figure out the
            problem.

            reference: http://blog.kowalczyk.info/article/gflags-a-debugging-story.html

            posted on 2009-07-14 12:47 披星戴月 閱讀(577) 評(píng)論(0)  編輯 收藏 引用 所屬分類: c/c++
            <2008年9月>
            31123456
            78910111213
            14151617181920
            21222324252627
            2829301234
            567891011

            常用鏈接

            留言簿(2)

            隨筆分類

            隨筆檔案

            文章檔案

            相冊(cè)

            搜索

            •  

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

            性色欲网站人妻丰满中文久久不卡| 99精品国产综合久久久久五月天| 久久精品人人做人人爽电影| 99久久99这里只有免费费精品| 99re这里只有精品热久久| 热99re久久国超精品首页| 欧美一级久久久久久久大片| 亚洲国产精品无码久久久秋霞2| 97超级碰碰碰碰久久久久| 久久人人爽人人爽人人片AV不 | 久久99国产精品久久99果冻传媒| 国产精品成人久久久久久久| 狠狠色婷婷久久一区二区| 国产午夜精品理论片久久 | 性做久久久久久久久| 精品一区二区久久| 亚洲精品乱码久久久久久蜜桃 | 国产精品一区二区久久精品无码 | 婷婷久久五月天| 岛国搬运www久久| 色婷婷综合久久久中文字幕| 久久九色综合九色99伊人| 久久久久成人精品无码中文字幕 | 久久AV高清无码| 日韩人妻无码精品久久久不卡| 国产午夜电影久久| 国产精品一久久香蕉国产线看| 中文字幕日本人妻久久久免费| 久久国产成人午夜AV影院| 国产福利电影一区二区三区久久老子无码午夜伦不 | 精品久久无码中文字幕| 国色天香久久久久久久小说| 久久亚洲精品无码观看不卡| AAA级久久久精品无码区| 青青草原综合久久| 久久夜色精品国产亚洲| 韩国无遮挡三级久久| 日韩精品国产自在久久现线拍| 99久久成人国产精品免费| 狠狠色丁香久久综合婷婷| 91精品国产综合久久香蕉 |