mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	halve memory consumption of mempool flist, since we know we cannot have more than n_blocks entries in it
This commit is contained in:
		
							parent
							
								
									c26be0d762
								
							
						
					
					
						commit
						113c62bf5d
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -693,7 +693,7 @@ pa_mempool* pa_mempool_new(pa_bool_t shared) {
 | 
			
		|||
    PA_LLIST_HEAD_INIT(pa_memimport, p->imports);
 | 
			
		||||
    PA_LLIST_HEAD_INIT(pa_memexport, p->exports);
 | 
			
		||||
 | 
			
		||||
    p->free_slots = pa_flist_new(p->n_blocks*2);
 | 
			
		||||
    p->free_slots = pa_flist_new(p->n_blocks);
 | 
			
		||||
 | 
			
		||||
    return p;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -747,7 +747,7 @@ void pa_mempool_vacuum(pa_mempool *p) {
 | 
			
		|||
 | 
			
		||||
    pa_assert(p);
 | 
			
		||||
 | 
			
		||||
    list = pa_flist_new(p->n_blocks*2);
 | 
			
		||||
    list = pa_flist_new(p->n_blocks);
 | 
			
		||||
 | 
			
		||||
    while ((slot = pa_flist_pop(p->free_slots)))
 | 
			
		||||
        while (pa_flist_push(list, slot) < 0)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue