标签:
* soft nproc 4096
* hard nproc 16384
或者是下面
bash-3.2$ ulimit -a
max user processes (-u) 4096
* soft nproc 16384
* hard nproc 16384
public class ThreadsTest extends Thread { public ThreadsTest() { start(); } public void run() { while(true) { try { Thread.sleep(120000); }catch (Exception e) {System.out.print(e);} } } public static void main(String[] args) { for(int i = 0;; i++){ new ThreadsTest(); System.out.println("Thread ...: " + i);} } }
再谈 Unlix (Linux, AIX, HPUX) 上 Java 的 java.lang.OutOfMemoryError: unable to create new native thread
标签:
原文地址:http://www.cnblogs.com/tang88seng/p/5171293.html