1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

Reduce total memory required to create all threads to 128MiB. This fixes

intermittent failure in stdlib/test-{atexit,at_quick_exit,...} tests
(Bug 22207).
This commit is contained in:
Paul Pluzhnikov
2017-09-25 17:51:34 -07:00
parent 3de93d194a
commit 8f8349870f
2 changed files with 11 additions and 0 deletions

View File

@ -57,6 +57,11 @@ do_test (void)
xpthread_attr_init (&attr);
xpthread_attr_setdetachstate (&attr, 1);
/* With default 8MiB Linux stack size, creating 1024 threads can cause
VM exhausiton on 32-bit machines. Reduce stack size of each thread to
128KiB for a maximum required VM size of 128MiB. */
xpthread_attr_setstacksize (&attr, 128 * 1024);
for (i = 0; i < kNumThreads; ++i) {
xpthread_create (&attr, threadfunc, NULL);
}