Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JNI help  RSS feed

 
Steve Chambers
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I use java to call out to something written in C is the code written in C part of the java process? Is this stuff part of the heap?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Details like that are going to be OS- and implementation-specific, so you can't get an absolute answer to this. But in general, yes.
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is certainly true in the Sun JVM for Linux and Windows, and in the Apple JVM for Mac OS X. On all these platforms, the native code goes into a shared library (DLL) that is loaded into the same process address space as the JVM.

When you say "the heap", be aware that there are lots of heaps, at various levels of OS and JVM.
[ November 02, 2007: Message edited by: Peter Chase ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!