Re: [PATCH 1/2] bundle: plug resource leak

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

 



Jeff King <peff@xxxxxxxx> writes:

> I do find it hard to believe that the bundle code had to invent its own
> ref storage data structure, and couldn't just use "struct ref" like all
> of the other code. It doesn't look like we ever sort it or do
> non-sequential access. The linked-list "struct ref" probably would have
> been fine.
>
> Not a problem you are introducing, of course, but if you are touching
> this code a lot, it might be worth seeing how painful it is.

The bundle code being fairly old, I actually wouldn't be surprised
if it predated the wide use of "struct ref" ;-)

It is not performance critical to add entries to the list of
prerequisites or references (i.e. it is OK to have these as linear
lists, not linked lists of "struct ref"), and these lists do not
have to be ultra-efficient in their storage use (i.e. it is OK to
replace these with "struct ref" linked lists), so we could go either
way.  It's not like we would be using a lot of helper functions we
already have for "struct ref" in this code, so I'm inclined to give
a very low priority to the task of rethinking this data structure.


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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]