FWIW, I had a client with a similar case of unexplained lockups, while running tests with my software. It didn't happen on my machine (Win2k) but did on his (WinXP).
We looked in the SYSTEM EVENT LOG, and found a message that preceded EVERY lockup:
3/3/2005 8:29:13 AM Service Control Manager Information None 7036 N/A XXXXXXX The IMAPI CD-Burning COM Service service entered the stopped state.When we turned OFF this service, he was able to run 15+ tests (20 minutes each) without failure. When we turned it back ON, we got the bad behavior (lockups, "out of virtual memory" messages) back.
Bottom line: The event log can give you clues.