I'm trying to alter OpenJDK source for my research project. I want to know the code flow when I invoke a new operator inside a Java program.
class MyFirstProgram {
public static void main(String args[]) throws Exception{
System.out.println("Hello World!");
int i[] = new int[50];
}
}
In the OpenJDK source code, I put several prints inside new operator implementation. (Path: OpenJDKDev/src/hotspot/share/memory/allocation.cpp)
I'm not sure if I'm checking the right file for memory allocation. It seems like even when I call java -version, it prints the messages I put many times.
I'm not able to find how exactly (and where exactly) the memory allocation calls are made when I call a new inside a user Java program.
Edit: --> Using JDK11.