By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,941 Members | 1,766 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,941 IT Pros & Developers. It's quick & easy.

Valgrind and Python

P: n/a
Running Python 2.5.1 under Valgrind is interesting; just starting it and
then pressing Ctrl-D produces this:

==27082== ERROR SUMMARY: 713 errors from 56 contexts (suppressed: 10 from 1)
==27082== malloc/free: in use at exit: 1,243,153 bytes in 508 blocks.
==27082== malloc/free: 3,002 allocs, 2,494 frees, 2,748,487 bytes allocated.
==27082== For counts of detected errors, rerun with: -v
==27082== searching for pointers to 508 not-freed blocks.
==27082== checked 1,399,984 bytes.
==27082==
==27082== LEAK SUMMARY:
==27082== definitely lost: 0 bytes in 0 blocks.
==27082== possibly lost: 17,072 bytes in 58 blocks.
==27082== still reachable: 1,226,081 bytes in 450 blocks.
==27082== suppressed: 0 bytes in 0 blocks.
==27082== Reachable blocks (those to which a pointer was found) are not shown.
==27082== To see them, rerun with: --show-reachable=yes

A lot of those 713 errors occur in the various deallocation functions.

--
Esa Peuha
student of mathematics at the University of Helsinki
http://www.helsinki.fi/~peuha/
Nov 10 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
on 11/10/2007 08:38 AM Esa A E Peuha wrote :
Running Python 2.5.1 under Valgrind is interesting; just starting it and
then pressing Ctrl-D produces this:

==27082== ERROR SUMMARY: 713 errors from 56 contexts (suppressed: 10 from 1)
==27082== malloc/free: in use at exit: 1,243,153 bytes in 508 blocks.
==27082== malloc/free: 3,002 allocs, 2,494 frees, 2,748,487 bytes allocated.
==27082== For counts of detected errors, rerun with: -v
==27082== searching for pointers to 508 not-freed blocks.
==27082== checked 1,399,984 bytes.
==27082==
==27082== LEAK SUMMARY:
==27082== definitely lost: 0 bytes in 0 blocks.
==27082== possibly lost: 17,072 bytes in 58 blocks.
==27082== still reachable: 1,226,081 bytes in 450 blocks.
==27082== suppressed: 0 bytes in 0 blocks.
==27082== Reachable blocks (those to which a pointer was found) are not shown.
==27082== To see them, rerun with: --show-reachable=yes

A lot of those 713 errors occur in the various deallocation functions.
really wired!!! i tried valgrind --leak-check=yes python on Python 2.4.3

it showed me even 839 errors,

==4375== ERROR SUMMARY: 839 errors from 108 contexts (suppressed: 38 from 1)
==4375== malloc/free: in use at exit: 710,604 bytes in 242 blocks.
==4375== malloc/free: 1,971 allocs, 1,729 frees, 1,541,112 bytes allocated.
==4375== For counts of detected errors, rerun with: -v
==4375== searching for pointers to 242 not-freed blocks.
==4375== checked 626,920 bytes.
I didn't get any error when using valgrind with perl or php!!!!

does that mean that python's interpretor is a memory beast?

Nov 10 '07 #2

P: n/a
|
| does that mean that python's interpretor is a memory beast?

No. The developers have occasionally run Valgrind on Python (or seen the
results of so doing). I believe they have determined that it gives
spurious messages due to some particular features of its coding style or
standards. See JPC's message.

Nov 10 '07 #3

P: n/a

"Esa A E Peuha" <es*******@helsinki.fiwrote in message
news:86*************@ruuvi.it.helsinki.fi...
| Running Python 2.5.1 under Valgrind is interesting;

What platform and compiler and compiler settings?

Nov 10 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.