Memory Usage in opkg

Tick tick at openmoko.com
Mon May 19 04:35:53 CEST 2008


Hi Thomas,
    Okay, please fix these leaks. Thanks.

Cheers,
Tick

Thomas Wood 提到:
> 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
>
>   





More information about the opkg-devel mailing list