高手请进:有足够的内存(还有15G空间) 还报pthread_create Cannot allocate memory
本人机器是64位的,16G内存的 Red Hat Enterprise Linux Server release as 6.0 ,
内存情况:
total used free shared buffers cached
Mem: 16449996 1146324 15303672 0 259008 224308
-/+ buffers/cache: 663008 15786988
Swap: 4194296 0 4194296
而且线程的栈空间改成了128K,但是目前我最多只能创建32375个线程
create 4:373 gpIntMem[2]:32372 thread sucess!
create 4:374 gpIntMem[2]:32373 thread sucess!
create 4:375 gpIntMem[2]:32374 thread sucess!
create 4:376 gpIntMem[2]:32375 thread sucess!
pthread_create: Cannot allocate memory
但是同样的代码我在 Red Hat Enterprise Linux Server as 4.0的机器上,我就可以创建几十万甚至上百万,
不知道怎么回事,请高手指点!!!