Re: CreateThread Fails with ERROR_NOT_ENOUGH_MEMORY....

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Pavel,
Yesterday it failed again with CreateThread failing with ERROR_NOT_ENOUGH_MEMORY. Thi time we ran with /3G switch enabled & the binary was linked with /LARGEADDRESSWARE option. The process VM was around 2.04GB, handle count around 5000 & the number of threads is 210. When we still have so much of space for user addr space, then what could go wrong withing CreateThread?
Am I reaching the upper limit for num of handles in one single process? Or that the total max number of objects is attained?
Dont have any clue to move forward. Can you suggest some approach. This is on Win2K Server.


Thanks,
Gary.

Pavel Lebedinsky [MSFT] wrote:
You could try doing .symopt+ 40 (this will turn on
SYMOPT_LOAD_ANYTHING), then pointing debugger to XP
symbols for ntdll and doing .reload. If the types that !address uses
haven't changed between Win2K and XP (I don't know if that's
the case) this might work.

.