I was getting Out of Memory Error: can't create native thread errors on a server, and it was definately not running out of memory, so I hacked this little program together to tell me how many threads I should be able to create.

64K is the minimum stack size that Java will allow on an Intel platform. OSX 10.6.3 Snow Leopard has a hard coded limit of 2560 threads. Leopard Server doesn’t seem to have this limit.