Arne Ansper wrote:
> Toomas Kiisk ([EMAIL PROTECTED]) reported that he was able to create more
> than 300 000 unnamed mutexes without problems.
Creating numerous mutexes is not a problem: cycling them through and
thrashing memory is. The problem with the implementation of mutexes is
the fact that no library maintains them quite the same. For instance,
Linux's and Windows' implementation is likely to be wholly different.
The purpose of OpenSSL is to maintain portability.
> using critical sections for intra-application locking is preferrable
> because they are much faster than mutexes (more than 50 times).
If you mean disabling multitasking, entering a protected mode, or using
processor-specific locking, the costs are less than optimal. The result
would mean platform-specific code being written for every critical
section. The result would mean a product that buys little more gains
while exponentially increasing complexity.
Another problem is the assumption. This discussion thread assumes that
the a lot of time is lost during mutex management. Has this been
profiled? I would suspect that the points of optimization are tucked
away elsewhere (typically in the cyphers). Managing mutexes is an
overhead, but I suspect it is very small compared to the rest of the system.
-Sean Walton
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]