What are the challenges you face when working across database platforms? Take the survey

Feature Request: Automatic Periodic Snapshots

CheetahCheetah Posts: 17
I'm debugging a very slow memory leak (that eventually leads to an application crash), and the most convenient way for me to do this would be to leave the app running under the memory profiler overnight. However, because the leak eventually kills off the app in a very unceremonious way, I want to make sure there is a snapshot at least near to the crash.

So, the hypothetical feature that would be very helpful for me: Add an option / behavior to the profiler to have it automatically take a snapshot every N seconds.

A fancier version that might also be useful: automatically take a snapshot when the {memory counter, e.g. # bytes in all heaps} value changes by more than N bytes since the last snapshot.


  • Options
    Still working on that same bug, I have another reason to desire automatic snapshots.

    I have reason to believe that I have code somewhere that only leaks if the monitor has gone into power save mode. As soon as it comes out of power save, the memory is released. So to diagnose the leak, I need a way to take a snapshot without waking up the monitor ...
  • Options

    I think you might find the EA build of ANTS Memory Profiler 7, which we released a couple of days ago, useful. You can obtain it from http://www.red-gate.com/messageboard/vi ... hp?t=12095.

    While it does not take periodic snapshots, you can now add one line to your code to take a snapshot when that line is executed.

    Please let us know what you think.

    Dominic Smith,
    Project Manager,
  • Options
    That sounds definitely useful, and much more powerful than the limited automation I suggested. I can trivially implement timed snapshots and whatever else I need on top of that.

    Thanks :)
  • Options
    This was posted a couple of years ago. Has there been any further movement on the automatic memory snapshot? and/or just how accessible is this feature in the API? I am taking a look at this for obvious reasons: to assess and hopefully arrest a serious memory "leak" (i.e. usage of static memory, stack, heap, etc).
  • Options
    Jessica RJessica R Posts: 1,319 Rose Gold 4

    Yes, the snapshot API feature has been available since version 7.0 of the Memory Profiler. It's simple to use--just add a reference to RedGate.MemoryProfiler.Snapshot.dll and call RedGate.MemoryProfiler.Snapshot.TakeSnapshot() in your code as needed.

    You can find more about it here: http://www.red-gate.com/supportcenter/c ... apshot_api

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?

Sign In or Register to comment.