[maemo-commits] [maemo-commits] r17459 - in projects/haf/trunk/hildon-thumbnail: . daemon daemon/plugins thumbs
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Feb 18 12:41:59 EET 2009
- Previous message: [maemo-commits] r17457 - projects/haf/tags/hildon-thumbnail
- Next message: [maemo-commits] r17460 - in projects/haf/trunk/gtk+: . gtk/tests tests
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: pvanhoof Date: 2009-02-18 12:41:55 +0200 (Wed, 18 Feb 2009) New Revision: 17459 Modified: projects/haf/trunk/hildon-thumbnail/ChangeLog projects/haf/trunk/hildon-thumbnail/config.h.in projects/haf/trunk/hildon-thumbnail/configure.ac projects/haf/trunk/hildon-thumbnail/daemon/hildon-thumbnail-daemon.c projects/haf/trunk/hildon-thumbnail/daemon/plugins/gdkpixbuf-jpeg-out-plugin.c projects/haf/trunk/hildon-thumbnail/daemon/plugins/gdkpixbuf-png-out-plugin.c projects/haf/trunk/hildon-thumbnail/daemon/thumbnailer.c projects/haf/trunk/hildon-thumbnail/thumbs/hildon-albumart-factory.c Log: 2009-02-18 Philip Van Hoof <pvanhoof at codeminded.be> * daemon/hildon-thumbnail-daemon.c * configure.ac: Usage of mallopt * thumbs/hildon-albumart-factory.c * daemon/plugins/gdkpixbuf-png-out-plugin.c * daemon/plugins/gdkpixbuf-jpeg-out-plugin.c * daemon/thumbnailer.c: Various small memory leaks Modified: projects/haf/trunk/hildon-thumbnail/ChangeLog =================================================================== --- projects/haf/trunk/hildon-thumbnail/ChangeLog 2009-02-17 16:07:34 UTC (rev 17458) +++ projects/haf/trunk/hildon-thumbnail/ChangeLog 2009-02-18 10:41:55 UTC (rev 17459) @@ -1,3 +1,13 @@ +2009-02-18 Philip Van Hoof <pvanhoof at codeminded.be> + + * daemon/hildon-thumbnail-daemon.c + * configure.ac: Usage of mallopt + + * thumbs/hildon-albumart-factory.c + * daemon/plugins/gdkpixbuf-png-out-plugin.c + * daemon/plugins/gdkpixbuf-jpeg-out-plugin.c + * daemon/thumbnailer.c: Various small memory leaks + 2009-02-17 Marius Vollmer <marius.vollmer at nokia.com> Released 3.0.19 Modified: projects/haf/trunk/hildon-thumbnail/config.h.in =================================================================== --- projects/haf/trunk/hildon-thumbnail/config.h.in 2009-02-17 16:07:34 UTC (rev 17458) +++ projects/haf/trunk/hildon-thumbnail/config.h.in 2009-02-18 10:41:55 UTC (rev 17459) @@ -6,6 +6,12 @@ /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the <malloc.h> header file. */ +#undef HAVE_MALLOC_H + +/* Define to 1 if you have the `mallopt' function. */ +#undef HAVE_MALLOPT + /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H Modified: projects/haf/trunk/hildon-thumbnail/configure.ac =================================================================== --- projects/haf/trunk/hildon-thumbnail/configure.ac 2009-02-17 16:07:34 UTC (rev 17458) +++ projects/haf/trunk/hildon-thumbnail/configure.ac 2009-02-18 10:41:55 UTC (rev 17459) @@ -5,6 +5,9 @@ AM_CONFIG_HEADER(config.h) +AC_CHECK_HEADERS(malloc.h) +AC_CHECK_FUNCS(mallopt) + AC_PROG_CC AM_PROG_CC_C_O Modified: projects/haf/trunk/hildon-thumbnail/daemon/hildon-thumbnail-daemon.c =================================================================== --- projects/haf/trunk/hildon-thumbnail/daemon/hildon-thumbnail-daemon.c 2009-02-17 16:07:34 UTC (rev 17458) +++ projects/haf/trunk/hildon-thumbnail/daemon/hildon-thumbnail-daemon.c 2009-02-18 10:41:55 UTC (rev 17459) @@ -26,6 +26,10 @@ #include <linux/sched.h> #include <sched.h> +#ifdef HAVE_MALLOC_H +#include <malloc.h> +#endif + #include <glib.h> #include <dbus/dbus-glib-bindings.h> #include <gio/gio.h> @@ -351,7 +355,12 @@ { DBusGConnection *connection; GError *error = NULL; - + + +#if defined (HAVE_MALLOPT) && defined(M_MMAP_THRESHOLD) + mallopt (M_MMAP_THRESHOLD, 128 *1024); +#endif + g_type_init (); if (!g_thread_supported ()) Modified: projects/haf/trunk/hildon-thumbnail/daemon/plugins/gdkpixbuf-jpeg-out-plugin.c =================================================================== --- projects/haf/trunk/hildon-thumbnail/daemon/plugins/gdkpixbuf-jpeg-out-plugin.c 2009-02-17 16:07:34 UTC (rev 17458) +++ projects/haf/trunk/hildon-thumbnail/daemon/plugins/gdkpixbuf-jpeg-out-plugin.c 2009-02-18 10:41:55 UTC (rev 17459) @@ -243,7 +243,7 @@ if (!nerror) { #ifdef HAVE_SQLITE3 gchar *dbfile; - gboolean create; + gboolean create = FALSE; if (!db) { gchar *dbfile; @@ -352,6 +352,7 @@ reload_config (config); + g_free (config); had_init = TRUE; } Modified: projects/haf/trunk/hildon-thumbnail/daemon/plugins/gdkpixbuf-png-out-plugin.c =================================================================== --- projects/haf/trunk/hildon-thumbnail/daemon/plugins/gdkpixbuf-png-out-plugin.c 2009-02-17 16:07:34 UTC (rev 17458) +++ projects/haf/trunk/hildon-thumbnail/daemon/plugins/gdkpixbuf-png-out-plugin.c 2009-02-18 10:41:55 UTC (rev 17459) @@ -359,6 +359,7 @@ reload_config (config); + g_free (config); had_init = TRUE; } Modified: projects/haf/trunk/hildon-thumbnail/daemon/thumbnailer.c =================================================================== --- projects/haf/trunk/hildon-thumbnail/daemon/thumbnailer.c 2009-02-17 16:07:34 UTC (rev 17458) +++ projects/haf/trunk/hildon-thumbnail/daemon/thumbnailer.c 2009-02-18 10:41:55 UTC (rev 17459) @@ -215,9 +215,9 @@ if (content_type) *mime_type = g_strdup (content_type); else if (mime_hint) - content_type = g_strdup (mime_hint); + *mime_type = g_strdup (mime_hint); else - content_type = g_strdup ("unknown/unknown"); + *mime_type = g_strdup ("unknown/unknown"); g_object_unref (info); } @@ -476,20 +476,24 @@ hash = g_hash_table_lookup (schemes, uri_scheme); if (!hash) { - hash = g_hash_table_new (g_str_hash, g_str_equal); + hash = g_hash_table_new_full (g_str_hash, g_str_equal, + (GDestroyNotify) NULL, + (GDestroyNotify) NULL); g_hash_table_replace (schemes, uri_scheme, hash); urls_for_mime = NULL; } else urls_for_mime = g_hash_table_lookup (hash, mime_type); urls_for_mime = g_list_prepend (urls_for_mime, uri); - g_hash_table_replace (hash, mime_type, urls_for_mime); + g_hash_table_replace (hash, mime_type, + urls_for_mime); } else if (has_thumb) thumb_items = g_list_prepend (thumb_items, /*XU3 */ g_strdup (urls[i])); } + //g_free (mime_type); i++; } @@ -682,6 +686,9 @@ g_object_unref (from_file); g_object_unref (to_file); + } + + for (z = 0; z < 3; z++) { g_free (from[z]); g_free (to[z]); } Modified: projects/haf/trunk/hildon-thumbnail/thumbs/hildon-albumart-factory.c =================================================================== --- projects/haf/trunk/hildon-thumbnail/thumbs/hildon-albumart-factory.c 2009-02-17 16:07:34 UTC (rev 17458) +++ projects/haf/trunk/hildon-thumbnail/thumbs/hildon-albumart-factory.c 2009-02-18 10:41:55 UTC (rev 17459) @@ -229,6 +229,8 @@ g_error_free (error); g_object_unref (filei); g_free (file_path); + if (info) + g_object_unref (info); continue; }
- Previous message: [maemo-commits] r17457 - projects/haf/tags/hildon-thumbnail
- Next message: [maemo-commits] r17460 - in projects/haf/trunk/gtk+: . gtk/tests tests
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]