[issue5092] weird memory usage in multiprocessing module

Jerzy report at bugs.python.org
Fri Jan 30 12:01:16 CET 2009


Jerzy <jerzyo at genesilico.pl> added the comment:

And anyway, for me it's not OK if something in a code of a function like 
'del' affect how variables are affected in whole function.

It is really illogical. There code is in lines and line are one below 
another. The logical way is that a line of code affects the program ONLY 
when it is executed and ONLY from the time it is executed. A statement 
that is not executed (python never reach the place) should not affect 
the program in ANY way.

You may think what you think, but for me it is a big bug in the heart of 
python

Jerzy

Martin v. Löwis wrote:
> Martin v. Löwis <martin at v.loewis.de> added the comment:
> 
>> I still do not understand what is going on when python executed thic 
>> code. I have a local variable l in my parent process. 
> 
> No, you don't. It's a global variable, not a local one.
> 
>> When I create a 
>> child process, program makes first makes a copy of memory. Than what?
> 
> It doesn't have to do anything with the multiprocessing at all.
> For comparison, just run the Python script
> 
> def f():
>   del l
> l = []
> f()
> 
> It produces the same error, with no multiprocessing involved.
> 
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue5092>
> _______________________________________
> 
> 
>

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5092>
_______________________________________


More information about the Python-bugs-list mailing list