From dd797bc8437d38b282bbc256e0df578e5d31dcc1 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 4 May 2007 20:06:00 +0000 Subject: [PATCH] - API: if using graphics, set worker thread stack size limit to max (from Rosetta@home) api/ graphics_impl.C svn path=/trunk/boinc/; revision=12562 --- api/graphics_impl.C | 7 +++++++ checkin_notes | 7 +++++++ doc/index.php | 2 -- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/api/graphics_impl.C b/api/graphics_impl.C index 3f1258b3e9..191adcc3b1 100755 --- a/api/graphics_impl.C +++ b/api/graphics_impl.C @@ -37,6 +37,7 @@ extern void win_graphics_event_loop(); #include #include #include +#include #include "x_opengl.h" #endif @@ -139,6 +140,12 @@ int start_worker_thread(WORKER_FUNC_PTR _worker_main) { // initialize ID of calling thread (the graphics-thread!) graphics_thread = pthread_self(); + // set work stack size to max + // + struct rlimit rlim; + getrlimit(RLIMIT_STACK, &rlim); + pthread_attr_setstacksize(&worker_thread_attr, rlim.rlim_max); + retval = pthread_create(&worker_thread, &worker_thread_attr, foobar, 0); if (retval) return ERR_THREAD; pthread_attr_destroy( &worker_thread_attr ); diff --git a/checkin_notes b/checkin_notes index c9b7cdf4fe..bfcd454d4e 100755 --- a/checkin_notes +++ b/checkin_notes @@ -4401,3 +4401,10 @@ David 4 May 2007 handle_request.C validator.C validate_util.h + +David 4 May 2007 + - API: if using graphics, set worker thread stack size limit to max + (from Rosetta@home) + + api/ + graphics_impl.C diff --git a/doc/index.php b/doc/index.php index e810b4e211..89882cb6b5 100644 --- a/doc/index.php +++ b/doc/index.php @@ -2,8 +2,6 @@ require_once("docutil.php"); require_once("../html/inc/translation.inc"); -header('Content-Type: text/html; charset="UTF-8"'); - function show_participant() { global $light_blue; $i = rand(0, 99);