[pulseaudio-commits] r1140 - in /trunk/src/pulsecore: hashmap.c idxset.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Sun Jul 23 15:35:31 PDT 2006
Author: lennart
Date: Mon Jul 24 00:35:30 2006
New Revision: 1140
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1140&root=pulseaudio&view=rev
Log:
as a result of memory profiling with valgrind/massif: decrease default hash table size from 1024 to 127. the hashtables are sparsely filled most of the time, so there is no point in allocating to much memory by default.
Modified:
trunk/src/pulsecore/hashmap.c
trunk/src/pulsecore/idxset.c
Modified: trunk/src/pulsecore/hashmap.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/hashmap.c?rev=1140&root=pulseaudio&r1=1139&r2=1140&view=diff
==============================================================================
--- trunk/src/pulsecore/hashmap.c (original)
+++ trunk/src/pulsecore/hashmap.c Mon Jul 24 00:35:30 2006
@@ -34,7 +34,7 @@
#include "hashmap.h"
-#define BUCKETS 1023
+#define BUCKETS 127
struct hashmap_entry {
struct hashmap_entry *next, *previous, *bucket_next, *bucket_previous;
Modified: trunk/src/pulsecore/idxset.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/idxset.c?rev=1140&root=pulseaudio&r1=1139&r2=1140&view=diff
==============================================================================
--- trunk/src/pulsecore/idxset.c (original)
+++ trunk/src/pulsecore/idxset.c Mon Jul 24 00:35:30 2006
@@ -78,7 +78,7 @@
s = pa_xnew(pa_idxset, 1);
s->hash_func = hash_func ? hash_func : pa_idxset_trivial_hash_func;
s->compare_func = compare_func ? compare_func : pa_idxset_trivial_compare_func;
- s->hash_table_size = 1023;
+ s->hash_table_size = 127;
s->hash_table = pa_xmalloc0(sizeof(idxset_entry*)*s->hash_table_size);
s->array = NULL;
s->array_size = 0;
More information about the pulseaudio-commits
mailing list