• <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) 評論(0)  編輯 收藏 引用 所屬分類: c/c++
            <2025年8月>
            272829303112
            3456789
            10111213141516
            17181920212223
            24252627282930
            31123456

            常用鏈接

            留言簿(2)

            隨筆分類

            隨筆檔案

            文章檔案

            相冊

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            久久精品aⅴ无码中文字字幕不卡 久久精品成人欧美大片 | 久久精品九九亚洲精品天堂| 人妻无码久久精品| 亚洲欧洲久久久精品| 久久精品免费一区二区| 久久国产精品无码一区二区三区| 99久久99这里只有免费的精品| 狠狠色丁香婷婷久久综合不卡 | 欧美亚洲另类久久综合| 国产成人精品久久一区二区三区av| 99久久伊人精品综合观看| 欧美精品九九99久久在观看| 日韩av无码久久精品免费| 热99re久久国超精品首页| 久久乐国产综合亚洲精品| 国产精品久久永久免费| 午夜精品久久久久9999高清| 无码精品久久久久久人妻中字| 久久久精品午夜免费不卡| 欧美久久一区二区三区| 久久本道伊人久久| 精产国品久久一二三产区区别| 久久成人国产精品二三区| 伊人久久久AV老熟妇色| 久久久久亚洲精品男人的天堂| 亚洲国产欧美国产综合久久| 久久久黄片| 久久亚洲国产欧洲精品一| 欧美一区二区久久精品| 国产香蕉97碰碰久久人人| 狠狠88综合久久久久综合网| 一本大道久久东京热无码AV| 国产高清美女一级a毛片久久w| 亚洲精品tv久久久久久久久| 久久精品视频一| 要久久爱在线免费观看| 久久久久综合中文字幕| 国产精品无码久久综合| 欧美黑人又粗又大久久久| 国产精品99久久久久久宅男小说| 国内精品久久久久久久亚洲 |