I am programming something in C that creates a lot of Pthreads in Linux on a 256Mb system. I usually have +200Mb free.
When I run the program with a low amount of thread
May be this is the reason:
"(Recognizing leaks
If you create a joinable thread but forget to join it, its resources or private memory are always kept in the process space and never reclaimed. Always join the joinable threads; by not joining them, you risk serious memory leaks.)"
Read it here: http://www.ibm.com/developerworks/library/l-memory-leaks/