python 2.5a2, gcc 4.1 and memory problems

Michele Petrazzo michele.petrazzo at TOGLIunipex.it
Sat May 6 04:56:20 EDT 2006


Hi list,
I'm doing some tests on my debian testing and I see a very strange
memory problem with py 2.5a2 (just downloaded) and compiled with gcc
4.1.0, but not with the gcc 3.3.5:

My test are:

#--test.py
import sys
if sys.version.startswith("2.3"):
  from sets import Set as set
b=set(range(5000000))
a=set(range(100000))
c = b-a

for i in 3 4 5; do echo "python 2.$i" && time python2.$i test.py; done

My configure args for compile py 2.5a2 are:

michele:~/Python-2.5a2$ export CC=gcc-4.1
michele:~/Python-2.5a2$ export CXX=g++-4.1
michele:~/Python-2.5a2$ ./configure --prefix=/usr --enable-shared
michele:~/Python-2.5a2$ make
michele:~/Python-2.5a2$ make install

michele:~/Python-2.5a2$ export CC=gcc-3.3
michele:~/Python-2.5a2$ export CXX=g++-3.3
michele:~/Python-2.5a2$ ./configure --prefix=/usr --enable-shared
michele:~/Python-2.5a2$ make
michele:~/Python-2.5a2$ make install

Then I execute my test. The memory usage of 2.5a2 and gcc 3.3 that I see
with "top", is the same (about VIRT: 260 MB and RES: 250MB ) that with
the py 2.3 and 2.4, but then I recompile with 4.1 and execute the same
test, my system "stop to work"... with "top" I can see that it use VIRT:
2440 MB and RES: 640MB RAM (I think all that I have into my pc)

I haven't tried to recompile py 2.4 myself with gcc 4.1 because it is
already compiled with it (4.0.3), so I think (only think) that is a py
2.5 problem.
I'm right? or I have to compile it with something other switches?

Thanks,
Michele



More information about the Python-list mailing list