John M
2005-10-13 04:09:52 UTC
Hi,
I'm porting a WinInet project to use WinHttp and am running into some hidden
allocation issues.
What I've noticed is that if I have 512 threads running simultaneously and
each of them calls WinHttpOpen, I get about 250MB allocated that never get
freed up. I've tried this with smaller numbers of threads and it's almost
exactly 428KB (438,272 bytes) that gets lost for each WinHttpOpen. Has
anybody else ever seen this?
Reading some of the older posts in this group, I'm sensing that maybe I only
need to make a single WinHttpOpen call and then let each thread use that
handle for it's subsequent Connects. Am I right about using just the one
WinHttpOpen call?
A little more reading (http://tinyurl.com/e34kl) makes me think that I might
only need to make a single call to WinHttpConnect as well. For the project
that I'm currently working on, all of the requests will be going to the same
server on the same port. Would I be safe to just make one single
WinHttpConnect call in this case?
I think that the WinHttpConnect calls don't hold any allocated memory after
their internal threads die off. Has anybody else seen different?
Thanks,
John
I'm porting a WinInet project to use WinHttp and am running into some hidden
allocation issues.
What I've noticed is that if I have 512 threads running simultaneously and
each of them calls WinHttpOpen, I get about 250MB allocated that never get
freed up. I've tried this with smaller numbers of threads and it's almost
exactly 428KB (438,272 bytes) that gets lost for each WinHttpOpen. Has
anybody else ever seen this?
Reading some of the older posts in this group, I'm sensing that maybe I only
need to make a single WinHttpOpen call and then let each thread use that
handle for it's subsequent Connects. Am I right about using just the one
WinHttpOpen call?
A little more reading (http://tinyurl.com/e34kl) makes me think that I might
only need to make a single call to WinHttpConnect as well. For the project
that I'm currently working on, all of the requests will be going to the same
server on the same port. Would I be safe to just make one single
WinHttpConnect call in this case?
I think that the WinHttpConnect calls don't hold any allocated memory after
their internal threads die off. Has anybody else seen different?
Thanks,
John