• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java Performance Companion and memory management principles

 
Ranch Hand
Posts: 140
4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On first glance, this new book looks very useful and interesting, regardless of whether it pertains to the question I wish to ask.

A current concern of mine is that I do not have a very complete grounding in general memory management issues as they relate to Java. I am mostly self-taught, but my education does include some classes back in the 1980's on cpu architecture and assembly language (at UC Berkeley, where I was a music major but dabbled in Comp Sci classes). I have something like 6 years of experience programming Java at this point, mostly audio-related, for game programming and real-time synths.

Are there sections in this book where memory management fundamentals are addressed? If not, is there a recommendation that anyone would be willing to provide?

I'd like to be able to read and understand articles such as this one: Memory management in LWJGL 3
 
author
Posts: 2
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Phil,

The Serviceability Agent chapter in the book has an example on how to diagnose OutOfMemoryError or potential memory leak issues. That example, and the tools discussed in that example might provide some insights into how to deal with the memory management issues.
 
author
Posts: 11
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Phil Freihofner wrote:On first glance, this new book looks very useful and interesting, regardless of whether it pertains to the question I wish to ask.

A current concern of mine is that I do not have a very complete grounding in general memory management issues as they relate to Java. I am mostly self-taught, but my education does include some classes back in the 1980's on cpu architecture and assembly language (at UC Berkeley, where I was a music major but dabbled in Comp Sci classes). I have something like 6 years of experience programming Java at this point, mostly audio-related, for game programming and real-time synths.

Are there sections in this book where memory management fundamentals are addressed? If not, is there a recommendation that anyone would be willing to provide?

I'd like to be able to read and understand articles such as this one: Memory management in LWJGL 3



The article included a link could probably be more generalized into the notion that passing data across the Java / JNI boundary is an expensive operation. The article doesn't seem to really talk about why that's the case. Rather, it talks more about their experience and how to avoid their pain.
I don't know of a good book or article that talks in a lot of detail as to why crossing the Java / JNI bound is so expensive. We could probably summarize that into; some times the data being passed across the JNI boundary is copied, one thing that needs to be guarded is a situation where a GC thread executes, moves an object, while a thread is executing in JNI / native code. The JVM must ensure that the native thread doesn't access a stale object location. There is also some security overhead involved too.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic