Re: [PATCH 01/13] repository: introduce object parser field

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

 



On Tue, May 1, 2018 at 11:33 PM, Stefan Beller <sbeller@xxxxxxxxxx> wrote:
>         /*
> -        * Holds any information related to accessing the raw object content.
> +        * Holds any information needed to retrieve the raw content
> +        * of objects. The object_parser uses this to get object
> +        * content which it then parses.
>          */
>         struct raw_object_store *objects;
>
> +       /*
> +        * State for the object parser. This owns all parsed objects
> +        * (struct object) so callers do not have to manage their
> +        * lifetime.
> +        */
> +       struct object_parser *parsed_objects;

I like this name 'parsed_objects'. Should we rename the struct after
it (e.g. parsed_object_store as opposed to raw_object_store above)?

Another suggestion is object_pool, if we keep 'struct object' instead
of 'struct parsed_object' and also want to keep current allocation
behavior: no individual deallocation. If you free, you free the whole
pool (e.g. you could run rev-list --all --objects in a separate pool,
once you're done, you delete the whole pool).
-- 
Duy



[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