Im working on a VB.net file management program that copies 100,000s of small images (20 - 300 KB).
At least it tries to. When doing large multi-hour operations I start getting exceptions with the
"Insufficient system resources exist to complete the requested service." error message.
In a few cases the computer has then crashed.
After a lot of debugging, finally with livekd kernal dump I can see that the System PTEs in the Kernel Mem are getting very low.. enough that kd had a message "******** running out of system PTEs *********"
Now I can monitor the PTE's in realtime with Performance Monitor with the Memory/Free System Page Table Entries.
I observe that after an hour or so the PTE's start dropping in what appears to be linear fashion as the program keeps copying.
Im sure it is the copy function causing the problem, because when i comment out the copy routine, the free PTEs stopped going down.
Behaviour is identical with both of these calls.
eSource, strFileDest, bOverwriteFile)
If I stop & close the program, PTEs do not seem to rebound at all. If I start the program again, the PTEs again start going down.
SO: What is up with File.Copy? Why is it using and not releasing all these PTE's? Seems this memory should be free after the copy.
How can I change my code to avoid running up the PTEs?
Thank you for any ideas, advice, assistance!
NOTE: That I asked this question before, but Ive learned enough about the problem that I decided to repost:
The test computer is Windows XP sp2 with 500MB ram. (also been testing with 1.5 G ram)
Ive found some helpful documents on PTEs, which discuss system configuration. But this is not really an option for me as this is a commercial product that others will be using on their own computers.
Detection, Analysis, and Corrective Actions for Low Page Table Entries.