Changes between Initial Version and Version 1 of Ticket #9945, comment 4


Ignore:
Timestamp:
Sep 4, 2013, 9:01:48 PM (11 years ago)
Author:
ttcoder

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9945, comment 4

    initial v1  
    44
    55I wonder if there is a way I could set a "watchpoint" in Debugger on a given heap area (rather than watch a given variable).. If yes then, knowing in advance one of the addresses of leaked memory blocks (from a previous run with printf() debug output ..etc) I could invoke debugger() at the beginning of main(), set the watchpoint on that address, click "Run" and get immediately notified (with an explicit backtrace) when that memory block gets malloc()ed. If I know who malloc()s it I'll have a good lead on who should be free()ing it yet fails to, probably.
     6
     7EDIT: I mean to say that if somebody calls malloc(260) but does not write any contents at that address, then watching the address of that block won't trigger a debugger notification at malloc() time but rather at a later time when somebody (else) writes into that block, presumably. What I would need is to "watch" the malloc chain or something.