diff options
author | Nagy Gabor <ngaba@bibl.u-szeged.hu> | 2008-07-15 01:07:22 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-07-15 19:16:42 -0500 |
commit | 03021713e5315312b150e6ac9c5cf48fe68f7615 (patch) | |
tree | fd2a3ebf3419726d048874b5f5d2ad9f73e7b542 /scripts/Makefile.am | |
parent | ffa3056010b6ea104a8d772d0349a705575a13ca (diff) | |
download | pacman-03021713e5315312b150e6ac9c5cf48fe68f7615.tar.xz |
_alpm_db_add_pkgincache rework
Commit 8240da6cb3ff95ad480efe3e1876104024398fae broke some alpm hierarchy
and introduced a new memleak (trans->packages was never freed in case of add
transaction, even if the transaction wasn't committed), so it is reverted
now.
We follow a different approach to reduce memory usage:
_alpm_db_add_pkgincache doesn't duplicate the whole package before adding
it to the cache, only the package name and version (INFRQ_BASE).
This method needs very small extra memory (compared to the reverted method),
and after transaction commit we use less memory than before (since the
big 'files' fields are not copied to cache), this is useful in GUIs.
Note: The old add_pkgincache was a bit broken, since pkg->origin wasn't
filled in correctly.
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Acked-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts/Makefile.am')
0 files changed, 0 insertions, 0 deletions