Mail Archives: cygwin-developers/1998/06/04/15:13:51
I believe there is a memory leak in the spawn code somewhere. So far
we haven't been able to track it down. We wrote a test case that
builds an argv/envp with some extra garbage in it that invoked
a hello-world program repeatedly with spawnve and _P_NOWAIT. We looped
over the spawn with a sleep(1) in between. Watching the VMSize and
MemUsage in the task manager showed the process was accumulating more
and more memory. Replacing the spawnve with fork+exec code resulted
in a program that did not accumulate memory. I can post test cases
we used if desired.
The only allocation I saw in the spawn functions themselves were
alloca calls which auto-free since they're on the stack (I ran tests
to verify alloca was working properly in the dll, too). I didn't
go tracing through every called procedure yet.
Btw, what is linearize_fd_array for, and why does the spawn code
use it (while the fork code doesn't appear to)?
Tim N.
- Raw text -