From: Rich Salz <[EMAIL PROTECTED]>

rsalz> > structure itself.  I'd do a malloc(size_of_mutex() + sizeof(RSA)) and
rsalz> > return a pointer to the RSA part of that blob.  I haven't thought
rsalz> > through everything yet.
rsalz> 
rsalz> You can't do that; pthreads, for example, often implement the
rsalz> mutex as an opaque pointers.

Yup, and that pointer will then take 4 or 8 bytes, and that's the size
that wold be allocated.

Of course, the mutex itself still creates heap fragmentation, but I
see no way of getting away from that (of course, that gives food to
those who want to minimise the amount of locks).

-- 
Richard Levitte   \ Spannv�gen 38, II \ [EMAIL PROTECTED]
Chairman@Stacken   \ S-168 35  BROMMA  \ T: +46-8-26 52 47
Redakteur@Stacken   \      SWEDEN       \ or +46-709-50 36 10
Procurator Odiosus Ex Infernis                -- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/
Software Engineer, Celo Communications: http://www.celocom.com/

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to