Re: [pypy-dev] Locals clearing in RPython

2012-09-06 Thread Benjamin Peterson
2012/9/6 Timothy Baldridge : > > Nice, but that completely missed the point of my question. I know this > wouldn't be a problem in this exact case. The question is: when is the GC > free to free data passed into a function's arguments. Will that function > hold on to all data passed in through argu

Re: [pypy-dev] Locals clearing in RPython

2012-09-06 Thread Armin Rigo
Hi Timothy, On Thu, Sep 6, 2012 at 8:34 PM, Timothy Baldridge wrote: > The question is: when is the GC > free to free data passed into a function's arguments. Will that function > hold on to all data passed in through arguments until the execution of the > function terminates? If so is there a wa

Re: [pypy-dev] Locals clearing in RPython

2012-09-06 Thread Timothy Baldridge
On Thu, Sep 6, 2012 at 1:30 PM, Benjamin Peterson wrote: > 2012/9/6 Timothy Baldridge : > > Let's imagine that I have some code like the following in RPython: > > > > > > def wrapper_func(arg1, arg2): > > return inner_func(arg2) > > > > def inner_func(x): > >for y in range(x): > > #

Re: [pypy-dev] Locals clearing in RPython

2012-09-06 Thread Benjamin Peterson
2012/9/6 Timothy Baldridge : > Let's imagine that I have some code like the following in RPython: > > > def wrapper_func(arg1, arg2): > return inner_func(arg2) > > def inner_func(x): >for y in range(x): > # do something here > pass >return -1 > > bigint = 100 > > wrapper

[pypy-dev] Locals clearing in RPython

2012-09-06 Thread Timothy Baldridge
Let's imagine that I have some code like the following in RPython: def wrapper_func(arg1, arg2): return inner_func(arg2) def inner_func(x): for y in range(x): # do something here pass return -1 bigint = 100 wrapper_func(list(range(bigint)), bigint) The problem here i