Message21331
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. |
|
Date |
User |
Action |
Args |
2007-08-23 14:23:01 | admin | link | issue980419 messages |
2007-08-23 14:23:01 | admin | create | |
|