This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author edemaine
Recipients
Date 2004-06-26.20:36:39
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The following Python one-liner causes the Python image
size to grow quickly (beyond 100 megabytes within 10
seconds or so on my Linux 2.4.18 box on an Intel
Pentium 4):

while True: 1 << 64

The point is that 1 << 64 gets automatically turned
into a long.  Somehow, even after all pointers to this
long disappear, it (or something produced along the
way) sticks around.  The same effect is obtained by the
following more natural code:

while True: x = 1 << 64

There is an easy workaround; the following code does
not cause a memory leak:

while True: 1L << 64

However, a memory leak should not be intended behavior
for the new int/long unification.
History
Date User Action Args
2007-08-23 14:23:01adminlinkissue980419 messages
2007-08-23 14:23:01admincreate