umdh - need some help

Hi Experts,

I have the following stack that occurs in the delta file (the compare file) after 2 snapshots are compared.  It's showing a memory leak - but I don't know where.

I'm hoping someone can help me with some tricks on how to determine which of the 5 functions the leak could be coming from [Run, SetStatusCompleted, SetStatus, SendRequest or SendHttpRequest]

I've looked through the code in all these functions at everything I can think of and cannot pinpoint where this leak is coming from.

Can anyone give me some ideas / general tricks of the trade without looking at the code?  I can't show the code in these functions for business reasons.

Thank you,
Mike


+   16472 (  16472 -      0)      1 allocs      BackTrace16182460
+       1 (      1 -      0)      BackTrace16182460      allocations

      ntdll! ?? ::FNODOBFM::`string'+0001913B
      webio!WaCreateEndpointManager+0000003B
      webio!WapQueryGlobalConnectionManager+00000108
      webio!WapQueryConnectionManager+00000571
      webio!WaQueryEndpoints+0000016B
      webio!WapQueryHttpRequestEndpoints+00000149
      webio!WapStartGetEndpoints+0000004D
      webio!WapAsynchronousSendHttpRequest+00000323
      webio!WebSendHttpRequest+0000004A
      WINHTTP!WEBIO_SENDER::SendRequest+0000021D
      WINHTTP!WEBIO_REQUEST::SendRequest+00000389
      WINHTTP!HTTP_USER_REQUEST::_SysSendRequest+000005E2
      WINHTTP!HTTP_USER_REQUEST::_SendRequestWithDrainComplete+000002A9
      WINHTTP!HTTP_USER_REQUEST::SendRequest+000006A1
      WINHTTP!WinHttpSendRequest+000003C7
      OurProject!CWinHttpClient::SendHttpRequest+0000063E (e:\proj\src\proj\servers\ourserver\inc\winhttpclient.cpp, 167)
      OurProject!CWebRequest::SendRequest+000001E4 (e:\proj\src\proj\servers\ourserver\inc\webrequest.cpp, 427)
      OurProject!CWebRequest::SetStatus+00000220 (e:\proj\src\proj\servers\ourserver\inc\webrequest.cpp, 359)
      OurProject!OurTask::SetStatusCompleted+000001BF (e:\proj\src\proj\servers\ourserver\server\analyze\OurTask.cpp, 205)
      OurProject!OurTask::Run+0000022D (e:\proj\src\proj\servers\ourserver\server\analyze\OurTask.cpp, 105)
      OurProject!RunTask+00000070 (e:\proj\src\proj\servers\ourserver\server\task\itask.cpp, 98)
      kernel32!BaseThreadInitThunk+0000000D
      ntdll!RtlUserThreadStart+0000001D
LVL 1
threadyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sarabandeCommented:
I am not familiar with the output of  the snapshots and the comparison you posted.

can you explain where the leak is and which outputs come from first snapshot and which came from second snapshot?

generally, if a network operation runs asynchronously you necessarily need a temporary buffer which cannot be freed before the asynchronous operation was finished. if that buffer was on the heap you temporarily would have a leak if you make a snapshot after call and before the send operation was finished. the way out often is to using a (static) buffer on the stack, but that is not always possible especially in multi-threaded environments where the next operation would need to use the same buffer.

Sara

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
threadyAuthor Commented:
It was actually in a pool- so it was created and kept around for re-use.

Thank you!
Mike
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.