Getting references to objects without incrementing reference counters

Artur Siekielski artur.siekielski at
Tue Nov 16 12:44:14 CET 2010

On Nov 15, 10:06 pm, John Nagle <na... at> wrote:
> On 11/14/2010 11:08 AM, Artur Siekielski wrote:
> > Hi.
> > I'm using CPython 2.7 and Linux. In order to make parallel
> > computations on a large list of objects I want to use multiple
> > processes (by using multiprocessing module). In the first step I fill
> > the list with objects and then I fork() my worker processes that do
> > the job.
> > This should work optimally in the aspect of memory usage because Linux
> > implements copy-on-write in forked processes.
>     There used to be a memory leak when using Pickle to talk
> to subprocesses.  See what I wrote at

It's something different - I'm not using serialization at all - I have
full Python objects "copied" into child processes :).

More information about the Python-list mailing list