[Stackless] Stackless for Palm Python port

Lun Yuen lun at cruelworld.com
Mon Oct 9 11:32:12 CEST 2000


> Python-1.5.2+ (post-string methods, pre-unicode) is the version ported to
> the Palm and I will need Stackless for this;  an upgrade to 2.0 is
> planned, but not for a couple of months.

Sorry, I was a bit confused as to how to parse the above quote:

- Does this mean there is a non-stackless 1.5.2+ version that has already
been ported to the Palm?  If so, is this publicly available?

- My assumption from the text is that a stackless version for the Palm is in
the works, and it sounds like there will be a 1.5.2+ version, and then a few
months later a 2.0 version.  Did I assume correctly?

Lun

p.s. I'm curious as to the status of the Palm port, since I hope to
eventually write some apps for the Palm, and would much prefer Python to
C/C++.

p.p.s.  Chris, thanks for putting this Stackless mailing list together!

-----Original Message-----
From: Jeff Collins [mailto:jcollins at endtech.com]
Sent: Sunday, October 08, 2000 7:36 PM
To: stackless at starship.python.net
Subject: [Stackless] Stackless for Palm Python port



On the Palm, stack and dynamic heap are very scarce.  The default stack of
4K is adjustable at the expense of dynamic heap.  Of course, for recursive
C calls, no amount of stack tweaking can guarantee the prevention of stack
overflows.  An overflow of the heap results in a MemoryError; an overflow
of the stack causes the device to crash.

The dynamic heap for devices running PalmOS 3.5 (eg, PalmIIIxe) is sized
depending on the total RAM - 256K on a 4MB+ device.  Though this may sound
relatively large, it can be quickly consumed by PalmOS libraries (such as
the Network Library) and by the Python VM itself.  

Obviously, Stackless Python will help to avoid the dreaded stack overflows
at the expense of dynamic heap.  Uthreads are also needed for the Palm,
since there is no threading currently available.  Before I begin the port,
here are a few questions:

1)  What is the overhead imposed by the new/modified objects?

2)  The current uthread.py module is quite large (approx 1500 LOC) and
will consume a large chunk of dynamic heap on import alone.  I read that
there are plans to convert this to C.  Will this happen any time soon?

3)  I haven't thought much about using uthreads in an event-loop
situation.  LispMe steps a thread along with each iteration of the event
loop.  This is also remeniscent of Will Ware's original uthread
implementation, where the scheduler is user defined.  What are the
potential problems with uthreads in an event-loop environment?

Python-1.5.2+ (post-string methods, pre-unicode) is the version ported to
the Palm and I will need Stackless for this;  an upgrade to 2.0 is
planned, but not for a couple of months.

Thanks.

-- 
Jeffery D. Collins  
Sr. Software Developer
Endeavors Technology, Inc.




_______________________________________________
Stackless mailing list
Stackless at starship.python.net
http://starship.python.net/mailman/listinfo/stackless
_______________________________________________
Stackless mailing list
Stackless at starship.python.net
http://starship.python.net/mailman/listinfo/stackless



More information about the Stackless mailing list