JNI implications on HotSpot

Michael Finocchiaro michael.finocchiaro at gmail.com
Mon Oct 6 08:53:44 PDT 2008


So, is there a white paper that describes in detail the differences between
memory management for Java objects and for native objects via JNI code? How
does the garbage collection work for the JNI objects and thus how does one
tune a JVM when the majority of code is (!groan!) C++ loaded into an
application server via a war and initiated via JNI? There must be some best
practices out there, or at least some description of the differences between
Java object memory management and native object memory management. At least
I hope there is...otherwise I suppose I'll be treading water...
Cheers,
Fino

Michael Finocchiaro
michael.finocchiaro at gmail.com
Mobile Telephone: +33 6 85 46 07 62
MSN: le_fino at hotmail.com
Blog: http://mfinocchiaro.wordpress.com
Bookmarks: http://del.icio.us/michael.finocchiaro


On Mon, Oct 6, 2008 at 4:43 PM, Tony Printezis
<Antonios.Printezis at sun.com>wrote:

> Hi.
>
> Michael Finocchiaro wrote:
>
>> I was wondering if there were any thoughts, or better yet, white papers,
>> on the performance implications of JNI code on HotSpot performance and
>> configuration. The malloc()s in the native JNI code are allocated on the
>> Eden heap with other Java objects and subject to the same rules?
>>
> Absolutely not. The Java heap is mmaped and we use custom memory management
> (GC!) and allocators for it; malloc uses a different space for allocations.
>
> Tony
>
>> Or not? Any boundary conditions to beware of? Google was not particularly
>> helpful so I am coming to the experts :)
>> Cheers,
>> Fino
>>
>>
>>
>> Michael Finocchiaro
>> michael.finocchiaro at gmail.com <mailto:michael.finocchiaro at gmail.com>
>> Mobile Telephone: +33 6 85 46 07 62
>> MSN: le_fino at hotmail.com <mailto:le_fino at hotmail.com>
>> Blog: http://mfinocchiaro.wordpress.com
>> Bookmarks: http://del.icio.us/michael.finocchiaro
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> hotspot-gc-use mailing list
>> hotspot-gc-use at openjdk.java.net
>> http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
>>
>>
>
> --
> ----------------------------------------------------------------------
> | Tony Printezis, Staff Engineer    | Sun Microsystems Inc.          |
> |                                   | MS BUR02-311                   |
> | e-mail: tony.printezis at sun.com    | 35 Network Drive               |
> | office: +1 781 442 0998 (x20998)  | Burlington, MA01803-0902, USA  |
> ----------------------------------------------------------------------
> e-mail client: Thunderbird (Solaris)
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20081006/02c001f6/attachment.html 


More information about the hotspot-gc-use mailing list