Search code examples
c++javajvm-hotspot

OpenJDK: Modifying Java Heap Management


The project that I'm working on is about modification of OpenJdk heap management and garbage collection systems. Currently my main concern is to find the code segments that are responsible for allocating space in heap when a new object is created.

I was wondering if any Java experts can tell me where to start searching.

Any feedback of yours will be greatly appreciated.


Solution

  • Method InstanceKlass::allocate_instance might be a good entry point for your research. It is calling CollectedHeap::obj_allocate.

    http://hg.openjdk.java.net/jdk8/jdk8/hotspot/file/87ee5ee27509/src/share/vm/oops/instanceKlass.cpp#l1096