Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hadoop, mail # user - Thread safety issues with JNI/native code from map tasks?


Copy link to this message
-
Re: Thread safety issues with JNI/native code from map tasks?
Keith Wiley 2011-01-29, 01:49
Hmmm, none of my native code is using JNI objects, so the memory in question should have no relationship to the Java heap or any other aspect of the Java world, but I admit, I'm unclear on who Java, JNI, and native libraries divide memory between one another or how they trade responsibility for allocating and deallocating memory.

I'll consider it, but since I'm not talking about JNI objects, I don't that can be it.  Do you think I'm misunderstanding something?

On Jan 28, 2011, at 16:24 , Todd Lipcon wrote:

> JNI may also work fine with no GC running, but then work badly when GC kicks
> in at a bad time. For example, if you grab a pointer to a String or array,
> you need to essentially lock them so the GC doesn't relocate the objects
> underneath you. For example, maybe you're releasing one of these references
> and then continuing to use it?
>
> -Todd
________________________________________________________________________________
Keith Wiley               [EMAIL PROTECTED]               www.keithwiley.com

"Luminous beings are we, not this crude matter."
  -- Yoda
________________________________________________________________________________