Branch: Tag:


2010-10-05 22:46:22 by Martin Stjernholm <>

Some clarifications for shared mapping/multiset data blocks.

845:   o Every destructive operation checks the flag. If set, it makes a    copy, otherwise it changes the original block. Thus the flag is    essentially a read-only marker. - o The flag is cleared by the gc if it finds only one ref to a data -  block. (Refcounting cannot be used without locking.) + o In addition to the flag, the gc performs normal refcounting. It +  clears the flag if the refcount is 1. (The refcount cannot be used +  directly since it's delay-updated.)   o Hazard pointers are necessary for every destructive access,    including the setting of the flag. The reason is that the    read-onlyness only is in effect after all currently modifying
866:   overhead handling the lock spaces of the mapping data blocks, and if a   mapping data is shared between lock spaces then it has to be in some   third lock space of its own, or in the global lock space, neither of - which would be very good. + which would be very good. So it doesn't look like there's a better way + than to botch copy-on-write in this case.    - So it doesn't look like there's a better way than to botch - copy-on-write in this case. +     -  +    Issue: Emulating the interpreter lock      For compatibility with old C modules, and for the _disable_threads