in reply to Oh where has my memory gone?

Every time you make a new thread, it copies everything. If you're not on Windows, you might want to try using forking instead. It will use less memory because of copy-on-write.

Replies are listed 'Best First'.
Re^2: Oh where has my memory gone?
by Anonymous Monk on Jun 09, 2008 at 19:49 UTC
    1. What about when the thread exits? Each time it initiates, they usually end a few minutes later... 2. Should I be fine now with goto / while(1) instead?