Git Product home page Git Product logo

Comments (4)

hkashyap avatar hkashyap commented on August 16, 2024

Thanks Michael for checking this. There was indeed a leak when I was not removing the thread_attr instances. I removed them now with pthread_attr_destroy(). A PR is coming.

before:
LEAK SUMMARY:
==13565== definitely lost: 8,970,752 bytes in 70,022 blocks
==13565== indirectly lost: 0 bytes in 0 blocks
==13565== possibly lost: 256 bytes in 2 blocks
==13565== still reachable: 0 bytes in 0 blocks
==13565== suppressed: 0 bytes in 0 blocks
==13565==
==13565== For counts of detected and suppressed errors, rerun with: -v
==13565== Use --track-origins=yes to see where uninitialised values come from
==13565== ERROR SUMMARY: 61 errors from 50 contexts (suppressed: 0 from 0)

after:

HEAP SUMMARY:
==15327== in use at exit: 8,192 bytes in 2 blocks
==15327== total heap usage: 109,228 allocs, 109,226 frees, 13,208,823 bytes allocated
==15327==
==15327== 4,096 bytes in 1 blocks are definitely lost in loss record 1 of 2
==15327== at 0x4C2B8A8: operator new[](unsigned long) (vg_replace_malloc.c:423)
==15327== by 0x465F92: SNN::copyAuxiliaryData(int, int, RuntimeData_s*, bool) (in /home/hirak/CARLsim4/projects/hello_world/hello_world)
==15327== by 0x467FB4: SNN::allocateSNN_CPU(int) (in /home/hirak/CARLsim4/projects/hello_world/hello_world)
==15327== by 0x43CD48: SNN::generateRuntimeSNN() (in /home/hirak/CARLsim4/projects/hello_world/hello_world)
==15327== by 0x406431: CARLsim::setupNetwork() (in /home/hirak/CARLsim4/projects/hello_world/hello_world)
==15327== by 0x405281: main (in /home/hirak/CARLsim4/projects/hello_world/hello_world)
==15327==
==15327== 4,096 bytes in 1 blocks are definitely lost in loss record 2 of 2
==15327== at 0x4C2B8A8: operator new[](unsigned long) (vg_replace_malloc.c:423)
==15327== by 0x465FED: SNN::copyAuxiliaryData(int, int, RuntimeData_s*, bool) (in /home/hirak/CARLsim4/projects/hello_world/hello_world)
==15327== by 0x467FB4: SNN::allocateSNN_CPU(int) (in /home/hirak/CARLsim4/projects/hello_world/hello_world)
==15327== by 0x43CD48: SNN::generateRuntimeSNN() (in /home/hirak/CARLsim4/projects/hello_world/hello_world)
==15327== by 0x406431: CARLsim::setupNetwork() (in /home/hirak/CARLsim4/projects/hello_world/hello_world)
==15327== by 0x405281: main (in /home/hirak/CARLsim4/projects/hello_world/hello_world)
==15327==
==15327== LEAK SUMMARY:
==15327== definitely lost: 8,192 bytes in 2 blocks
==15327== indirectly lost: 0 bytes in 0 blocks
==15327== possibly lost: 0 bytes in 0 blocks
==15327== still reachable: 0 bytes in 0 blocks
==15327== suppressed: 0 bytes in 0 blocks

from carlsim4.

hkashyap avatar hkashyap commented on August 16, 2024

We still have some leak here:
SNN::copyAuxiliaryData()

from carlsim4.

hkashyap avatar hkashyap commented on August 16, 2024

PR
#22

from carlsim4.

hkashyap avatar hkashyap commented on August 16, 2024

fixed with #22

from carlsim4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.