Neal Norwitz wrote:
> My thoughts are to dynamically allocate the Python stack memory (e.g.,
> void *stack = malloc(128MB)).  Then all calls within each thread uses
> its own stack.  So things would be pushed onto the stack like they are
> currently, but we wouldn't need to do create a tuple to pass to a
> method, they could just be used directly.  Basically more closely
> simulate the way it currently works in hardware.

One issue with argument tuples on the stack (or some sort of stack) is
that functions may hold onto argument tuples longer:

def foo(*args):
     global last_args
     last_args = args

I considered making true tuple objects (i.e. with ob_type etc.) on
the stack, but this possibility breaks it.

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to