Lines Matching refs:size
68 /// Default size of the unsafe stack. This value is only used if the stack
69 /// size rlimit is set to infinity.
72 /// Runtime page size obtained through sysconf
95 static inline void *unsafe_stack_alloc(size_t size, size_t guard) {
96 CHECK_GE(size + guard, size);
97 void *addr = MmapOrDie(size + guard, "unsafe_stack_alloc");
102 static inline void unsafe_stack_setup(void *start, size_t size, size_t guard) {
103 CHECK_GE((char *)start + size, (char *)start);
105 void *stack_ptr = (char *)start + size;
110 unsafe_stack_size = size;
175 size_t size = 0;
179 pthread_attr_getstacksize(attr, &size);
182 // get pthread default stack size
185 pthread_attr_getstacksize(&tmpattr, &size);
190 CHECK_NE(size, 0);
191 CHECK_EQ((size & (kStackAlign - 1)), 0);
194 void *addr = unsafe_stack_alloc(size, guard);
196 (struct tinfo *)(((char *)addr) + size - sizeof(struct tinfo));
200 tinfo->unsafe_stack_size = size;
212 // Determine the stack size for the main thread.
213 size_t size = kDefaultUnsafeStackSize;
218 size = limit.rlim_cur;
221 void *addr = unsafe_stack_alloc(size, guard);
223 unsafe_stack_setup(addr, size, guard);