ensureLocalCapacity
Ensures that at least a given number of local references can be created in the current thread.
Before it enters a native method, the VM automatically ensures that at least 16 local references can be created.
For backward compatibility, the VM allocates local references beyond the ensured capacity. (As a debugging support, the VM may give the user warnings that too many local references are being created. In the JDK, the programmer can supply the -verbose:jni command line option to turn on these messages.) The VM calls fatalError if no more local references can be created beyond the ensured capacity.
Some Java Virtual Machine implementations may choose to limit the maximum capacity. The HotSpot JVM implementation, for example, uses the -XX:+MaxJNILocalCapacity flag (default: 65 536).
Since
JDK/JRE 1.2
Parameters
the minimum number of required local references. Must be >= 0.
Throws
if fails.