fork()

Barry A. Warsaw bwarsaw at cnri.reston.va.us
Mon Jun 7 22:43:49 EDT 1999


>>>>> "HN" == Hrvoje Niksic <hniksic at srce.hr> writes:

    >> I fear that in reality the memory is copied after all. If they
    >> use the dictionary in any way they are modifying refcounts of
    >> at least some of the objects in the dictionary. From the OS's
    >> point of view this counts as modifying the memory.

    HN> Eek.  You're right.  Refcounting truly sucks.  :-(

It needn't though.  IIRC, NextStep didn't keep the refcounts in the
objects.  Also, since most objects in that system were transient and
only had a refcount of 1, such objects didn't have entries in the
object refcount dictionary until their refcounts were increased to 2.

-Barry




More information about the Python-list mailing list