01-05-04 16.59, skrev Doug MacEachern p� [EMAIL PROTECTED] f�ljande:

> On Fri, 4 May 2001, Artur Bergman wrote:
> 
>>> the shared attribute works in bleedperl, but it does not mean what you
>>> think it means.  search the archives for GvSHARED, in particular:
>>> http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-02/msg00535.html
>>> in a nutshell, GvSHARED GVs are not copied across perl_clone, and
>>> piggyback the existing SvREADONLY checks for memory
>>> savings.  these `shared' GVs cannot be written to once marked as GvSHARED
>> 
>> Unless one unmarks them and protect them using Mutexes. (just turn of
>> readonly) 
> 
> that is not what GvSHARED is designed for.
> it is not possible to write to a GvSHARED GV from Perl without xs or
> without trying really hard, in which case the user deserves the shot in
> the foot they're giving themselves.
> GvSHARED is designed to cut down on memory bloat, sharing data that is
> normally used readonly already, for example:
> - xsubs
> - large hashes and arrays such as *EXPORT*

I understand that, I am just trying to find ways to avoid cloning. (and I
will shoot myself)

But large hashes contains SVs, are they also shared READONLY? Can't they be
stringified or upgraded in anyway?

>> Do you have the code that does this avaible somewhere?
> 
> i just put a copy here:
> http://perl.apache.org/~dougm/solar-0.01.tar.gz
> 
> 
Thanks!

Reply via email to