[pacman-dev] libalpm data structures

Aaron Griffin aaronmgriffin at gmail.com
Thu Nov 1 12:39:32 EDT 2007


On 11/1/07, Kevin Piche <kevin.piche at cgi.com> wrote:
> Not a criticism since I haven't done a code review - I assume it's just
> legacy.  I'm curious as to why package names are duped and put on
> multiple lists instead of pointers to package structs one per package.

Yeah, it's legacy. And I agree with you. I think the whole
complication is knowing when to free the package structure and when
not to.

If we keep freeing entirely up to the package cache list (excepting,
of course, packages loaded from a file), then we can very easily use
pointers to packages here - this will save us decent chunks of memory,
especially considering the static sized strings are crap (which
reminds me, I had a branch to change that... I think it went poof at
some point).




More information about the pacman-dev mailing list