Menu

The problem of high memory usage

石增辉
2024-12-18
2024-12-19
  • 石增辉

    石增辉 - 2024-12-18

    When I scan a repository of hundreds of C files (Version: V2.15.0 linux)

    Based on the output log, I found that:
    1. At the beginning, the scanning speed is very fast, but after a period of time, the speed of log printing will be much slower
    2. Each cppcheck process will occupy 700M of memory

    I really want to know why this situation occurs and where the configuration is wrong? Especially why does it occupy such a high amount of memory, and how can I avoid it?

    Here is the command I ran:
    ./cppcheck -j 8 --force --max-configs=1000 --xml --xml-version=2 ./ source_code/ 2>./report/report.xml

     
  • Andrew C Aitchison

    Does adding a build cache with --cppcheck-build-dir=

    help ?

     
    • 石增辉

      石增辉 - 2024-12-19

      Firstly, thank you for your reply

      As you said, I added:-- cppcheck-build-dir=./

      1. According to the information printed in the log, it is still similar to before:
      The scanning of the first few hundred files seems to be completed quickly, but it is getting slower and slower, taking several minutes to scan a file

      2. Each cppcheck process occupies 700M of memory

       

      Last edit: 石增辉 2024-12-19

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.