Global cleanups #2420

pull sipa wants to merge 1 commits into bitcoin:master from sipa:globclean changing 2 files +41 −2
  1. sipa commented at 1:21 am on March 29, 2013: member

    Clean up all known global datastructures at shutdown.

    This should make leak detection much easier.

    Typical valgrind output after this: ==5897== definitely lost: 0 bytes in 0 blocks ==5897== indirectly lost: 0 bytes in 0 blocks ==5897== possibly lost: 1,903 bytes in 9 blocks ==5897== still reachable: 194,073 bytes in 2,929 blocks

    (almost all of the reachable stuff is RPC/asio/boostthreads)

  2. Clean up global datastructures at shutdown.
    This should make detecting leaks much easier.
    3427517d50
  3. jgarzik commented at 1:25 am on March 29, 2013: contributor

    Nice!

    FWIW, In my own programs, I usually add a “–free” command line option, which optionally cleans up on exit (slowing down exit), rather than the rapid exit(0). Similarly, since freeing the block index and other numerous structures is a lot of pointless work at shutdown for 99.9% of users, I would suggest something similar for bitcoind.

  4. sipa commented at 1:29 am on March 29, 2013: member
    I certainly don’t notice it, but if you want it optional, sure, that can be arranged.
  5. BitcoinPullTester commented at 9:35 am on March 30, 2013: none
    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/3427517d507a938074a50fa8ea6dfe3d13bef357 for binaries and test log. This is an automated test script which runs test cases on each commit every time is updated. It, however, dies sometimes and fails to test properly, if you are waiting on a test, please check timestamps and if the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ and contact BlueMatt on freenode if something looks broken.
  6. Diapolo commented at 3:47 pm on April 2, 2013: none
    How much extra time does that cleanup take? If it’s not a huge increase in shutdown time, why make it optional?
  7. gavinandresen commented at 5:00 pm on April 2, 2013: contributor

    Very nice.

    We can make this optional later, if needed, I’m going to pull now.

  8. gavinandresen referenced this in commit d8aae1ce1d on Apr 2, 2013
  9. gavinandresen merged this on Apr 2, 2013
  10. gavinandresen closed this on Apr 2, 2013

  11. sipa deleted the branch on May 3, 2013
  12. laudney referenced this in commit bae80a93e7 on Mar 19, 2014
  13. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-06-17 16:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me