tracker r1105 - in trunk: . src/trackerd
- From: jamiemcc svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1105 - in trunk: . src/trackerd
- Date: Mon, 28 Jan 2008 04:12:04 +0000 (GMT)
Author: jamiemcc
Date: Mon Jan 28 04:12:04 2008
New Revision: 1105
URL: http://svn.gnome.org/viewvc/tracker?rev=1105&view=rev
Log:
made thread stack size configurable
Modified:
trunk/ChangeLog
trunk/src/trackerd/tracker-utils.c
trunk/src/trackerd/tracker-utils.h
trunk/src/trackerd/trackerd.c
Modified: trunk/src/trackerd/tracker-utils.c
==============================================================================
--- trunk/src/trackerd/tracker-utils.c (original)
+++ trunk/src/trackerd/tracker-utils.c Mon Jan 28 04:12:04 2008
@@ -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);
Modified: trunk/src/trackerd/tracker-utils.h
==============================================================================
--- trunk/src/trackerd/tracker-utils.h (original)
+++ trunk/src/trackerd/tracker-utils.h Mon Jan 28 04:12:04 2008
@@ -252,6 +252,7 @@
int initial_sleep;
int max_words_to_index;
int memory_limit;
+ int thread_stack_size;
gboolean fast_merges;
/* HAL battery */
Modified: trunk/src/trackerd/trackerd.c
==============================================================================
--- trunk/src/trackerd/trackerd.c (original)
+++ trunk/src/trackerd/trackerd.c Mon Jan 28 04:12:04 2008
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]