Re: [PATCH 2/2] softmmu/physmem: fix dirty memory bitmap memleak

2022-03-31 Thread Peter Xu
On Thu, Mar 31, 2022 at 07:14:12PM +0300, Andrey Ryabinin wrote: > > > On 3/30/22 22:25, Peter Xu wrote: > > On Fri, Mar 25, 2022 at 06:40:13PM +0300, Andrey Ryabinin wrote: > >> The sequence of ram_block_add()/qemu_ram_free()/ram_block_add() > >> function calls leads to leaking some memory. > >>

Re: [PATCH 2/2] softmmu/physmem: fix dirty memory bitmap memleak

2022-03-31 Thread Peter Xu
On Fri, Mar 25, 2022 at 06:40:13PM +0300, Andrey Ryabinin wrote: > The sequence of ram_block_add()/qemu_ram_free()/ram_block_add() > function calls leads to leaking some memory. > > ram_block_add() calls dirty_memory_extend() to allocate bitmap blocks > for new memory. These blocks only grow but n

Re: [PATCH 2/2] softmmu/physmem: fix dirty memory bitmap memleak

2022-03-31 Thread David Hildenbrand
On 31.03.22 14:27, Peter Xu wrote: > On Thu, Mar 31, 2022 at 10:37:39AM +0200, David Hildenbrand wrote: >> On 25.03.22 16:40, Andrey Ryabinin wrote: >>> The sequence of ram_block_add()/qemu_ram_free()/ram_block_add() >>> function calls leads to leaking some memory. >>> >>> ram_block_add() calls dir

Re: [PATCH 2/2] softmmu/physmem: fix dirty memory bitmap memleak

2022-03-31 Thread Andrey Ryabinin
On 3/30/22 22:25, Peter Xu wrote: > On Fri, Mar 25, 2022 at 06:40:13PM +0300, Andrey Ryabinin wrote: >> The sequence of ram_block_add()/qemu_ram_free()/ram_block_add() >> function calls leads to leaking some memory. >> >> ram_block_add() calls dirty_memory_extend() to allocate bitmap blocks >> f

Re: [PATCH 2/2] softmmu/physmem: fix dirty memory bitmap memleak

2022-03-31 Thread Peter Xu
On Thu, Mar 31, 2022 at 10:37:39AM +0200, David Hildenbrand wrote: > On 25.03.22 16:40, Andrey Ryabinin wrote: > > The sequence of ram_block_add()/qemu_ram_free()/ram_block_add() > > function calls leads to leaking some memory. > > > > ram_block_add() calls dirty_memory_extend() to allocate bitmap

Re: [PATCH 2/2] softmmu/physmem: fix dirty memory bitmap memleak

2022-03-31 Thread David Hildenbrand
On 25.03.22 16:40, Andrey Ryabinin wrote: > The sequence of ram_block_add()/qemu_ram_free()/ram_block_add() > function calls leads to leaking some memory. > > ram_block_add() calls dirty_memory_extend() to allocate bitmap blocks > for new memory. These blocks only grow but never shrink. So the > q

Re: [PATCH 2/2] softmmu/physmem: fix dirty memory bitmap memleak

2022-03-30 Thread Peter Xu
On Fri, Mar 25, 2022 at 06:40:13PM +0300, Andrey Ryabinin wrote: > The sequence of ram_block_add()/qemu_ram_free()/ram_block_add() > function calls leads to leaking some memory. > > ram_block_add() calls dirty_memory_extend() to allocate bitmap blocks > for new memory. These blocks only grow but n