311 static void current_stack_region(address *bottom, size_t *size) { |
311 static void current_stack_region(address *bottom, size_t *size) { |
312 pthread_attr_t attr; |
312 pthread_attr_t attr; |
313 int res = pthread_getattr_np(pthread_self(), &attr); |
313 int res = pthread_getattr_np(pthread_self(), &attr); |
314 if (res != 0) { |
314 if (res != 0) { |
315 if (res == ENOMEM) { |
315 if (res == ENOMEM) { |
316 vm_exit_out_of_memory(0, "pthread_getattr_np"); |
316 vm_exit_out_of_memory(0, OOM_MMAP_ERROR, "pthread_getattr_np"); |
317 } |
317 } |
318 else { |
318 else { |
319 fatal(err_msg("pthread_getattr_np failed with errno = %d", res)); |
319 fatal(err_msg("pthread_getattr_np failed with errno = %d", res)); |
320 } |
320 } |
321 } |
321 } |