> memory copying is an expensive operation

Yes, and I believe what @dscho  is suggesting removes a copy

> And I try to avoid using Java arrays cause they are significantly slower then native ones.

Um... no?  Once you're in native code arrays are arrays are arrays.  It doesn't matter where they came from.  Perhaps you're thinking of the nasty overhead that JNI introduces because of it's poor API (forcing you to copy in and out of byte arrays).

> And about protection…

I can see why it's natural to assume that PROTECT has something to do with thread-safety (which it doesn't).  Instead, it informs the garbage collector that the array is currently being accessed from native code (in case a collection is triggered there) - and that the GC must pay special attention to it.