[pypy-dev] Locals clearing in RPython
Timothy Baldridge
tbaldridge at gmail.com
Thu Sep 6 20:34:39 CEST 2012
On Thu, Sep 6, 2012 at 1:30 PM, Benjamin Peterson <benjamin at python.org>wrote:
> 2012/9/6 Timothy Baldridge <tbaldridge at gmail.com>:
> > 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 = 1000000
> >
> > wrapper_func(list(range(bigint)), bigint)
>
> Since that's all evaluated at import time, I don't see what the problem is.
>
>
>
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 arguments until the execution of the
function terminates? If so is there a way to trigger garbage collection of
unneeded argument data before the end of the function's execution?
Timothy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20120906/fece7885/attachment.html>
More information about the pypy-dev
mailing list