Richard Levitte - VMS Whacker wrote:
> 
> From: Dr S N Henson <[EMAIL PROTECTED]>
> 
> drh> Unfortunately removing 'const' from ASN1_ITEM will presumably mean that
> drh> they end up being in the data rather than the text segment and each
> drh> process needs its own copy of exactly the same data.
> 
> Uhmm, I'm tired and sick, so my brain may not function very well.  I
> wonder, though, why constness would go away?
> 

I'm not too well myself...

Anyway, the structure of the ASN1_ITEM is completely constant. By that I
mean the whole tree is constant, not just a few things at the top level.
The whole thing is initialized at compile time.

The net result is that the stuff ends up in the text segment, at least
under Linux and is in read only memory: I've checked.

Now if you change things so one ASN1_ITEM member can be modified at
runtime I suspect the whole thing will end up in the data segment. That
by itself isn't a problem because of the copy on write stuff under Unix
(and no doubt other OSes) which still means the data can be shared.
However when the structure is initialized at runtime on the first use
(as it would need to be) it will be modified and this will result in
multiple copies of the same data.

Well at least thats what I think will happen anyway...

Steve.
-- 
Dr Stephen N. Henson.   http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED] 
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the   OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to