implement primitive heap dump facility for memory profiling, accessible via Runtime.dumpHeap

The proper way to do this is to implement a subset of JVMTI, but this
will do the job for now.
This commit is contained in:
Joel Dice
2008-10-21 17:38:20 -06:00
parent f38a55cbb2
commit 6a5116e7a7
8 changed files with 434 additions and 31 deletions

View File

@ -75,6 +75,8 @@ public class Runtime {
public native long totalMemory();
public static native void dumpHeap(String outputFile);
private static class MyProcess extends Process {
private long pid;
private final int in;