mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	pulsecore: Reference count mempools
In future commits, server-wide SHMs will be replaced with per-client ones that will be dynamically created and freed according to clients connections open and close. Meanwhile, current PA design does not guarantee that the per-client mempool blocks are referenced only by client-specific objects. Thus reference count the pools and let each memblock inside the pool itself, or just attached to it, increment the pool's refcount upon allocation. This way, per-client mempools will only be freed when no further component in the system holds any references to its blocks. DiscussionLink: https://goo.gl/qesVMV Suggested-by: Tanu Kaskinen <tanuk@iki.fi> Suggested-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
This commit is contained in:
		
							parent
							
								
									1f5e72264e
								
							
						
					
					
						commit
						9bda6e344a
					
				
					 17 changed files with 84 additions and 20 deletions
				
			
		| 
						 | 
				
			
			@ -249,7 +249,7 @@ static void context_free(pa_context *c) {
 | 
			
		|||
        pa_hashmap_free(c->playback_streams);
 | 
			
		||||
 | 
			
		||||
    if (c->mempool)
 | 
			
		||||
        pa_mempool_free(c->mempool);
 | 
			
		||||
        pa_mempool_unref(c->mempool);
 | 
			
		||||
 | 
			
		||||
    if (c->conf)
 | 
			
		||||
        pa_client_conf_free(c->conf);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue