[pacman-dev] alpm_list: missing quick access to last element

Jürgen Hötzel juergen at hoetzel.info
Wed Mar 7 15:05:56 EST 2007

On Mon, Mar 05, 2007 at 01:14:27PM -0600, Aaron Griffin wrote:
> On 3/5/07, Aaron Griffin <aaronmgriffin at gmail.com> wrote:
> > whereas a typical implementation of the same thing
> > (like ours) requires two.
> requires THREE*

Well, this is because the list_header is embedded in the data structures. 
This requires us to change every pacman struct to include the list_header (if it
used by the list functions). List callback function like alpm_list_fn_cmp
will still require *void casting.

There are other areas where libpacman is quite inefficient (in respect of
memory usage). Consider the fixed size preallocated strings in pmpkg_t
(sizeof(pmpkg_t) == 1948). Memory footprint of pacman reading
current/extra/community requires currently 10M (desc files on disc allocate 0.8M).


More information about the pacman-dev mailing list