Max number of PRLock objects

Anton Kostov <[email protected]>
Newsgroups gmane.comp.mozilla.devel.nspr
Organization http://groups.google.com
Message-ID <[email protected]>
Hi guys,

/ I'm sorry if this was posted before me (I've searched but didn't
find the issue). /

Is there a way to directly find the maximum number of PRLock objects
that are available for creation at a certain moment? AFAIK, the only
way to receive that there are no more mutexes available on the system
is to check the return value of PR_NewLock(void), i.e. NULL when "for
example, the lock cannot be created because of resource constraints".

The reason I am asking this is my attempt to optimize synchronization
of a large arrays of structures - i.e. instead of using one PRLock for
the entire array, to use a certain ammount of PRLock's that are
responsible for parts of the array.

Thanks for your responses in advance,
BR, Anton
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.