mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	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.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1140 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									95eee87380
								
							
						
					
					
						commit
						c85351ba05
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -78,7 +78,7 @@ pa_idxset* pa_idxset_new(unsigned (*hash_func) (const void *p), int (*compare_fu
 | 
			
		|||
    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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue