psyco out of memory

Christian Tismer tismer at stackless.com
Fri Aug 6 12:42:41 CEST 2004


Michael Hudson wrote:

> Ivan Voras <ivoras at __geri.cc.fer.hr> writes:
> 
> 
>>I have this simple *dumb* benchmark-like program:
>>
>>#import psyco

It crashes here, right?

I think I know this problem. Armin submitted
a patch concerning memory mapping. Upgrading to
the current cvs version and building by hand should help.

>>#psyco.full()
>>
>>d = 0.0
>>for i in xrange(1000000000):
>>     d += i
>>print d

You need to wrap this into a function, or you will
not get accelerated.

>>I though I'd use it to try out psyco, but no, when I enable the first
>>two lines, python core-dumps:
>>
>>Fatal Python error: psyco: out of memory
>>Abort (core dumped)
> 
> 
> Hum.  Are you using the ivm or the x86 backend?
> 
> Also, you might have better luck just using range()...

No, there is no difference using range or xrange, but the
fact that your machine will blow up if Psyco is not in
place and you try to build a range that huge. That's why
I prefer xrange.

ciao - chris


p.s.:
Btw. there has been a bug in Psyco which made the xrange
case slower when using Psyco with Stackless. No Stackless bug,
simply the case that I do a PyType_Ready() on xrange which
standard Python dowsn't, and that inserts a defaul init
function that Psyco did not support (until Wednesday)

-- 
Christian Tismer             :^)   <mailto:tismer at stackless.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  mobile +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/




More information about the Python-list mailing list