Mark,
On 5/15/24 15:49, Mark Thomas wrote:
On 15/05/2024 13:53, Christopher Schultz wrote:
All,
We have a few functions in jnilib.c that create new local references
e.g. tcn_new_stringn and most of them call EnsureLocalCapacity to make
sure the thread doesn't run out of local references.
I'm fairly sure that calling New*Array will fail if such references
cannot be created, but the other methods make this protected call
beforehand and I feel like we should be consistent.
Any objections to me adding calls to EnsureLocalCapacity in
tcn_new_array* functions?
+1 to be being consistent.
Ack.
No strong view on whether that means adding them where they are missing
or just removing the ones we currently have.
The Internets seem to say that running out of local references is
entirely possible even with today's monstrous JVMs. I think it's worth
adding the calls. They are probably very cheap, anyway, like checking to
see if a stack pointer has collided with something else.
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org