c++ - Is there a way to set thread stack size using GCD? -
i have multiplatform code has recursive calls (running in thread, not main one), , in cases default stack size not enough recursivity depth. solve in windows using /stack compiler flag:
/stack:2097152 (2mb, default: 1mb)
but in osx use gcd. readed implemented on pthreads, not able find way set threads' stack size pthreads (using pthread_attr_setstacksize).
i tried using linker flag -wl,-stack_size -wl,1000000, doesn't matter amount set here, application crashes @ same recursivity depth level. seems affects main thread, not ones created after gcd.
i tried setting system stack size throught ulimit -s 32768 (default: 8192), not affect recursivity depth level can achieve either.
Comments
Post a Comment