Index: src/trackerd/tracker-utils.h =================================================================== --- src/trackerd/tracker-utils.h (revision 1096) +++ src/trackerd/tracker-utils.h (working copy) @@ -252,6 +252,7 @@ int initial_sleep; int max_words_to_index; int memory_limit; + int thread_stack_size; gboolean fast_merges; /* HAL battery */ Index: src/trackerd/trackerd.c =================================================================== --- src/trackerd/trackerd.c (revision 1096) +++ src/trackerd/trackerd.c (working copy) @@ -2122,6 +2122,8 @@ tracker->use_extra_memory = TRUE; + tracker->thread_stack_size = 0; + tracker->throttle = 0; tracker->initial_sleep = 45; @@ -2813,7 +2815,8 @@ /* this var is used to tell the threads when to quit */ tracker->is_running = TRUE; - tracker->user_request_thread = g_thread_create ((GThreadFunc) process_user_request_queue_thread, NULL, FALSE, NULL); + tracker->user_request_thread = g_thread_create_full ((GThreadFunc) process_user_request_queue_thread, NULL, + tracker->thread_stack_size, FALSE, FALSE, G_THREAD_PRIORITY_NORMAL, NULL); @@ -2825,7 +2828,8 @@ exit (1); } - tracker->file_process_thread = g_thread_create ((GThreadFunc) process_files_thread, NULL, FALSE, NULL); + tracker->file_process_thread = g_thread_create_full ((GThreadFunc) process_files_thread, NULL, tracker->thread_stack_size, + FALSE, FALSE, G_THREAD_PRIORITY_NORMAL, NULL); } g_main_loop_run (tracker->loop); Index: src/trackerd/tracker-utils.c =================================================================== --- src/trackerd/tracker-utils.c (revision 1096) +++ src/trackerd/tracker-utils.c (working copy) @@ -2575,6 +2575,8 @@ "BucketRatio=1\n", "# Alters how much padding is used to prevent index relocations. Higher values improve indexing speed but waste more disk space. Value should be in range (1..8)\n", "Padding=2\n", + "# Sets stack size of trackerd threads in bytes. The default on Linux is 8Mb (0 will use the system default).\n", + "ThreadStackSize=0\n", NULL); g_file_set_contents (filename, contents, strlen (contents), NULL); @@ -2788,6 +2790,10 @@ tracker->padding = g_key_file_get_integer (key_file, "Performance", "Padding", NULL); } + if (g_key_file_has_key (key_file, "Performance", "ThreadStackSize", NULL)) { + tracker->thread_stack_size = g_key_file_get_integer (key_file, "Performance", "ThreadStackSize", NULL); + } + g_free (filename); g_key_file_free (key_file);