Add:Core:Made cache size configurable
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 6 Jan 2009 19:01:50 +0000 (19:01 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 6 Jan 2009 19:01:50 +0000 (19:01 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1915 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/file.c

index 6ca957c..05f98f1 100644 (file)
@@ -413,9 +413,9 @@ file_get_os_handle(struct file *file)
 void
 file_init(void)
 {
-#if 0
+#ifdef CACHE_SIZE
        file_name_hash=g_hash_table_new(g_str_hash, g_str_equal);
-       file_cache=cache_new(sizeof(struct file_cache_id), 2*1024*1024);
+       file_cache=cache_new(sizeof(struct file_cache_id), CACHE_SIZE);
 #endif
 }