Menu

Very high memory usage.

2020-01-29
2020-01-29
  • Nigel Hawkins

    Nigel Hawkins - 2020-01-29

    I've just upgraded from an older version of cppcheck (1.82), and the new version (1.90) uses vastly more memory than the old version.

    I'm trying to analyse a project with about 850 cpp files and 1000 h files. in both cases I'm set to use as many threads as possible, analyse all #ifdef configurations and check for inconclusive errors. Using the prebuilt windows installers from the website.

    v1.82 - Maximum memory usage is about 450Mbyte and grows roughly linearly as the analysis progresses.
    v1.90 - Reaches 6GByte about 25% of the way through the analysis.

    I have to kill the v1.90 process at that point as it starts some serious swapping to virtual memory and the system becomes unusable if it let it carry on.

    Addendum - v1.83 seems to be the first version with this high memory usage.

     
  • Georgiy Komarov

    Georgiy Komarov - 2020-01-29

    Hello,

    What command-line arguments do you pass to cppcheck? Do you use cppcheck add-ons?

     
  • Nigel Hawkins

    Nigel Hawkins - 2020-01-29

    No add-ons.
    I'm running it through the GUI, so no clue what the command line options are.

    The project file is:
    <project version="1">
    <platform>win32A</platform>
    <analyze-all-vs-configs>false</analyze-all-vs-configs>
    <check-headers>true</check-headers>
    <check-unused-templates>false</check-unused-templates>
    <max-ctu-depth>10</max-ctu-depth>
    <includedir>
    </includedir></project>



    <libraries>
    <library>windows</library>
    </libraries>

    On the preferences screen, I've got the following options checked:

    General tab -
    7 threads.
    Force checking of all #ifdef configurations
    Show "No errors found" message when no errors found.
    Display error Id
    Check for inconclusive errors also

    Reports tab -
    Save all errors when creating report
    Save full path to files in reports

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.