Skip to content

Commit d5d3368

Browse files
CuriousLearnerambv
authored andcommitted
bpo-18859: Document --with-valgrind option in README.valgrind (#10591)
1 parent 8b9c33e commit d5d3368

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Misc/README.valgrind

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ This document describes some caveats about the use of Valgrind with
22
Python. Valgrind is used periodically by Python developers to try
33
to ensure there are no memory leaks or invalid memory reads/writes.
44

5+
If you want to enable valgrind support in Python, you will need to
6+
configure Python --with-valgrind option or an older option
7+
--without-pymalloc.
8+
59
UPDATE: Python 3.6 now supports PYTHONMALLOC=malloc environment variable which
610
can be used to force the usage of the malloc() allocator of the C library.
711

@@ -46,6 +50,10 @@ If you disable PyMalloc, most of the information in this document and
4650
the supplied suppressions file will not be useful. As discussed above,
4751
disabling PyMalloc can catch more problems.
4852

53+
PyMalloc uses 256KB chunks of memory, so it can't detect anything
54+
wrong within these blocks. For that reason, compiling Python
55+
--without-pymalloc usually increases the usefulness of other tools.
56+
4957
If you use valgrind on a default build of Python, you will see
5058
many errors like:
5159

0 commit comments

Comments
 (0)