1

In order to investigate memory build up in my Application (Native code on windows platform) I did the following

1) Ran test case in iteration

2) after each iteration dumped UMDH and then took diff between certain iterations to see a pattern of memory build up in the call stacks. I need some help here with following data, which I need to interpret

a) At the very end of diff log i find something like this Total increase == 86928 requested + 38080 overhead = 125008 What exactly is overhead here? If I add up all allocation and deduct the deallocations I get a number close to the #requested amount. I cannot account for the overhead number.

b) Another help needed is with call stacks below is a snapshot of a part of call stack

sqlncli11!PrepOrPrepExecQuery+159
sqlncli11!SQLExecute+32D
ODBC32!SQLExecute+342
sscdms80!CSSODBCSqlCursor::DoExecuteStmt+B4C (m:\some filename, 2903)
sscfdm!CSSLockSqlCursor::DoExecuteStmt+11A (m:\Another filename, 5237)
sscfdm!CSSSqlCursor::Execute+129 (m:\yet Anotherfilename, 5685)
sscfdm!CSSSqlObj::Execute+D86 (m:\Filename.cpp, 27500)
sscfom!CSSBusComp::SqlExecute+3A (m:\someotherfile.cpp, 28872)

With each function name there is an offset attached (a HEX number) example  sscfom!CSSBusComp::SqlExecute+3A  (here 3A is the offset).

what is the significance of that offset? I did not find any document explaining this.

c) How is the delta in private bytes captured by perfmon correlated to be delta in call stack during that interval?

  • 1
    Heap allocations always have book-keeping overhead, you get a high number because it must store those stack traces. You always get an offset from the known function address, where ever inside the compiled function body the call was made. Private bytes is a very inaccurate number with high granularity, it includes free blocks. – Hans Passant Sep 15 '14 at 15:06
  • Hi @HansPassant Thanks a ton for your response. I have few additional queries. I am trying to hunt down reason for memory buildup in my application (native code on windows) In umdh when I take a diff between logs I find call stacks arranged by decreasing size of allocations. In the topmost I have a stack that sought most allocation (say callStack1). When I scroll to bottom I find the same call stack i.e. callStack1, with negative allocation in the diff log(is it deallocation from the call stack?) Please clarify! – Amit Priyadarshi Sep 17 '14 at 04:51
  • @HansPassant A second Query as character limit wouldn't allow me to club them together! Additionally If it is deallocation then typically it should have similar magnitude as allocation?? Please correct me if I am wrong. I am stating this because you would use the same handle (pointer for deallocation) as the one you used while allocating memory.Only undercircumstances it was released from a different ponter to that memeory would the magnitudes differ. The reason I want to know this is because I want to zero down on suspective callstacks in the analysis. – Amit Priyadarshi Sep 17 '14 at 04:52

0 Answers0