Re: [PATCH 05/10] t-reftable-block: use block_iter_reset() instead of block_iter_close()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 14, 2024 at 05:33:13PM +0530, Chandra Pratap wrote:
> block_iter_reset() restores a block iterator to its state at the time
> of initialization without freeing any memory while block_iter_close()
> deallocates the memory for the iterator.
> 
> In the current testing setup, a block iterator is allocated and
> deallocated for every iteration of a loop, which hurts performance.
> Improve upon this by using block_iter_reset() at the start of each
> iteration instead. This has the added benifit of testing
> block_iter_reset(), which currently remains untested.

I don't think that performance is a good argument, but exercising the
reset function certainly is.

> Similarly, remove reftable_record_release() for a reftable record
> that is still in use.

This is a welcome change, too, to verify that reading into the same
record multiple times does not leak memory and otherwise works as
expected.

Patrick




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux