Chase Venters wrote:
> On Thursday 15 December 2005 03:35 pm, Perrin Harkins wrote:
> 
>>Not a great way to start your post.  Please read this:
>>http://modperlbook.org/html/ch10_01.html
> 
> 
> My apologies. I do own the book and I have read it, but it was some time ago 
> and I didn't remember that some of my questions were addressed. My biggest 
> question was the last one pertaining to the possible trick to optimize 
> memory. I'm starting to realize after reading over my original post (and your 
> reply) that I could have been more clear with some of my questions.
> 
> 
>>>     Also - as of the current Perl 5.8 series, we're still not sharing /
>>>doing COW with variable memory (SV/HV/AV) right?
>>
>>COW doesn't care what's in the memory.  It will share pages with
>>variables in them if they don't change.  Even reading a variable in a
>>new context can change it in perl though.
> 
> 
> Well, I should have been more clear here that I was no longer talking about 
> prefork. What I meant by COW here was actually that if you were going to use 
> multiplicity with Perl_clone, since the threads would share memory, Perl 
> would either need to:
> 
> (a) create a copy of all variables;
> or
> (b) use a thread sync primitive like an rwsem and do its own COW on this data.
> 
At the moment when using threads the ***whole*** memory is copied! Nick
Clark has been working on something like COW for threads but I don't
know the actual state. Although please note that thread performance has
been increased a lot in 5.8-releases so when using threads stick to the
latest 5.8 release available.

Tom

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to