Memory Usage in opkg
Thomas Wood
thomas at openedhand.com
Fri May 16 17:54:45 CEST 2008
Hi Tick,
I've just run valgrind against my libopkg-test utility and I have
attached the long file that was produced. The libopkg-test performs a
simple set of instructions: list packages, update lists, install,
remove, upgrade, etc.
As you can see, there are quite a lot of errors, and it's possible that
opkg can be leaking up to several MB of memory in just one short
session.
This probably isn't a huge problem for opkg-cl, where it does one action
then quits. However, for PackageKit this may be a big problem because
opkg may be executing many different commands and be running for a
significant length of time.
I propose that I spend a few days to try and reduce the memory leakage.
At first glance, most of the problems seem to originate in a few places
of the old ipkg code. Please let me know your thoughts on how you want
to proceed.
Here is the graph output from running massif over libopkg_test:
--------------------------------------------------------------------------------
Command: .libs/libopkg_test
Massif arguments: (none)
ms_print arguments: massif.out.25988
--------------------------------------------------------------------------------
MB
22.97^ #
| @#
| ,@# .. ,.. . ... .,
| @@@# :. @ . .: : ::: @:: : ::: :@
| @ @@@# :: @ : :: : ::: @:: : ::: :@
| ,@ @@@# :: @ : :: : ::: @:: : ::: :@
| @@ @@@# :: @ : :: : ::: @:: : ::: :@
| @ @@ @@@# :: @ : :: : ::: @:: : ::: :@
| :@ @@ @@@# :: @ : :: : ::: @:: : ::: :@
| @ ::@ @@ @@@# :: @ : :: : ::: @:: : ::: :@
| @@ . ::@ @@ @@@# :: @ : :: : ::: @:: : ::: :@
| @@@ . , :: ::@ @@ @@@# :: @ : :: : ::: @:: : ::: :@
| . @@@ .: @ :::: : :: ::@ @@ @@@# :: @ : :: : ::: @:: : ::: :@
| :: @@@ :: @ :::: : :: ::@ @@ @@@# :: @ : :: : ::: @:: : ::: :@
| @:: @@@ :: @ :::: : :: ::@ @@ @@@# :: @ : :: : ::: @:: : ::: :@
| . @:: @@@ :: @ :::: : :: ::@ @@ @@@# :: @ : :: : ::: @:: : ::: :@
| : @:: @@@ :: @ :::: : :: ::@ @@ @@@# :: @ : :: : ::: @:: : ::: :@
| . : @:: @@@ :: @ :::: : :: ::@ @@ @@@# :: @ : :: : ::: @:: : ::: :@
| : : @:: @@@ :: @ :::: : :: ::@ @@ @@@# :: @ : :: : ::: @:: : ::: :@
| :: : @:: @@@ :: @ :::: : :: ::@ @@ @@@# :: @ : :: : ::: @:: : ::: :@
0 +----------------------------------------------------------------------->Gi
0 1.253
Regards,
Thomas
--
OpenedHand Ltd.
Unit R Homesdale Business Center / 216-218 Homesdale Road /
Bromley / BR1 2QZ / UK Tel: +44 (0)20 8819 6559
Expert Open Source For Consumer Devices - http://o-hand.com/
------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: valgrind.log
Type: text/x-log
Size: 173271 bytes
Desc: not available
Url : http://lists.openmoko.org/pipermail/opkg-devel/attachments/20080516/77087936/attachment.bin
More information about the opkg-devel
mailing list