Re: [PATCH v2 08/10] reftable/writer: optimize allocations by using a scratch buffer

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

 



On Wed, Nov 20, 2024 at 11:21:54AM +0100, Christian Couder wrote:
> On Wed, Nov 20, 2024 at 9:07 AM Patrick Steinhardt <ps@xxxxxx> wrote:
> 
> > diff --git a/reftable/writer.h b/reftable/writer.h
> > index e8a6fbb78543e6e56920a2999601db0db9fe4d97..421a897dccd85ad0532860ff1b4f38b2813d438d 100644
> > --- a/reftable/writer.h
> > +++ b/reftable/writer.h
> > @@ -20,6 +20,7 @@ struct reftable_writer {
> >         void *write_arg;
> >         int pending_padding;
> >         struct reftable_buf last_key;
> > +       struct reftable_buf buf;
> 
> Nit: It would be nice to add a comment, so that readers don't have to
> look at .c files, or the commit message, to find what this field is
> used for.

Fair enough. I'll also rename it to `scratch` while at it to clarify its
intent a bit. Other parts of the reftable library already use that name.

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