Revert "Improve stack overflow diagnostics."

This reverts commit aa754dca90.

Change-Id: Ifa76eee31f7f44075eb3a48554315b2693062f44
This commit is contained in:
Guang Zhu
2013-07-17 03:17:05 +00:00
parent aa754dca90
commit d14dc3b87f
3 changed files with 33 additions and 57 deletions

View File

@@ -30,16 +30,12 @@
#include "pthread_internal.h"
// Traditionally we give threads a 1MiB stack. When we started allocating per-thread
// alternate signal stacks to ease debugging of stack overflows, we subtracted the
// same amount we were using there from the default thread stack size. This should
// keep memory usage roughly constant.
#define DEFAULT_THREAD_STACK_SIZE ((1 * 1024 * 1024) - SIGSTKSZ)
#define DEFAULT_STACK_SIZE (1024 * 1024)
int pthread_attr_init(pthread_attr_t* attr) {
attr->flags = 0;
attr->stack_base = NULL;
attr->stack_size = DEFAULT_THREAD_STACK_SIZE;
attr->stack_size = DEFAULT_STACK_SIZE;
attr->guard_size = PAGE_SIZE;
attr->sched_policy = SCHED_NORMAL;
attr->sched_priority = 0;