# HG changeset patch # User nenolod # Date 1174453211 25200 # Node ID c079e507869a825993864b0bd81067b0fa15a507 # Parent eefcf9c621758adc9f1d9c567d33bbc0ac144e5c [svn] - use a managed heap for playlist entry node allocation. diff -r eefcf9c62175 -r c079e507869a ChangeLog --- a/ChangeLog Tue Mar 20 21:40:54 2007 -0700 +++ b/ChangeLog Tue Mar 20 22:00:11 2007 -0700 @@ -1,3 +1,11 @@ +2007-03-21 04:40:54 +0000 William Pitcock + revision [4282] + - typo + + trunk/configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + + 2007-03-21 04:39:00 +0000 William Pitcock revision [4280] - integrate libmowgli requirement into buildsystem diff -r eefcf9c62175 -r c079e507869a src/audacious/build_stamp.c --- a/src/audacious/build_stamp.c Tue Mar 20 21:40:54 2007 -0700 +++ b/src/audacious/build_stamp.c Tue Mar 20 22:00:11 2007 -0700 @@ -1,2 +1,2 @@ #include -const gchar *svn_stamp = "20070321-4280"; +const gchar *svn_stamp = "20070321-4282"; diff -r eefcf9c62175 -r c079e507869a src/audacious/playlist.c --- a/src/audacious/playlist.c Tue Mar 20 21:40:54 2007 -0700 +++ b/src/audacious/playlist.c Tue Mar 20 22:00:11 2007 -0700 @@ -30,6 +30,7 @@ #include "playlist.h" +#include #include #include #include @@ -137,6 +138,8 @@ static void playlist_recalc_total_time(Playlist *); static gboolean playlist_entry_get_info(PlaylistEntry * entry); +static mowgli_heap_t *playlist_entry_heap = NULL; + /* *********************** playlist entry code ********************** */ PlaylistEntry * @@ -147,7 +150,7 @@ { PlaylistEntry *entry; - entry = g_new0(PlaylistEntry, 1); + entry = mowgli_heap_alloc(playlist_entry_heap); entry->filename = g_strdup(filename); entry->title = str_to_utf8(title); entry->length = length; @@ -178,7 +181,7 @@ if (entry->title != NULL) g_free(entry->title); - g_free(entry); + mowgli_heap_free(playlist_entry_heap, entry); } static gboolean @@ -237,6 +240,10 @@ { Playlist *initial_pl; + /* create a heap with 1024 playlist entry nodes preallocated. --nenolod */ + playlist_entry_heap = mowgli_heap_create(sizeof(PlaylistEntry), 1024, + BH_NOW); + /* FIXME: is this really necessary? REQUIRE_STATIC_LOCK(playlists); */ initial_pl = playlist_new(); diff -r eefcf9c62175 -r c079e507869a src/audacious/playlist.h --- a/src/audacious/playlist.h Tue Mar 20 21:40:54 2007 -0700 +++ b/src/audacious/playlist.h Tue Mar 20 22:00:11 2007 -0700 @@ -23,6 +23,7 @@ #ifndef PLAYLIST_H #define PLAYLIST_H +#include #include #include "audacious/titlestring.h" #include "input.h" diff -r eefcf9c62175 -r c079e507869a src/audacious/widgets/Makefile --- a/src/audacious/widgets/Makefile Tue Mar 20 21:40:54 2007 -0700 +++ b/src/audacious/widgets/Makefile Tue Mar 20 22:00:11 2007 -0700 @@ -7,6 +7,7 @@ CFLAGS += \ $(GTK_CFLAGS) \ + $(MOWGLI_CFLAGS) \ $(LIBGLADE_CFLAGS) \ $(BEEP_DEFINES) \ $(ARCH_DEFINES) \