Jeroen Dirks
Jeroen Dirks

Reputation: 7887

When do methods like JNI GetDoubleArrayElements set isCopy to true or false?

When would the VM pin vs copy the arrays involved here?

If you want to minimize memory usage can you force a pin vs a copy?

Upvotes: 1

Views: 411

Answers (1)

user207421
user207421

Reputation: 310985

I think it's more a matter of which JVM implementation does copying and which does pinning, not what runtime conditions might determine that choice, although I can certainly imagine that say an object in permgen space might be more amenable to being pinned than a brand new one.

The decision is the JVM's, not yours.

Upvotes: 1

Related Questions