On Thu, 21 Dec 2023 10:17:18 GMT, Martin Doerr <mdo...@openjdk.org> wrote:

>> Let's keep it simple. A linear array of only a few items is easily scanned, 
>> probably faster than pointer hopping hash table entries. Not that it matters 
>> in any way for the few calls to dlopen.
>> 
>> Also, avoiding hotspot structures preserves layer integrity (porting_aix 
>> does not pull anything from hotspot so far) and prevents initialisation time 
>> dependencies. Not sure whether ConcurrentHashTable works before VM init, but 
>> with Joachimes current solution, we can call dlopen at any time in VM life.
>
> I don't like introducing unnecessary limitations. Are we sure nobody will 
> ever need more than 1024 handles?
> Can't we at least use a GrowableArray or something like that?

In principle you are right, but in my opinion 1024 is an academical limit. I 
never saw processes with more than a few dozen loaded libraries.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16920#discussion_r1433942205

Reply via email to