public static int RunProc(string[] cmd) { java.lang.Runtime rt = java.lang.Runtime.getRuntime(); java.lang.Process proc = rt.exec(cmd); StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR"); StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "OUTPUT"); errorGobbler.start(); outputGobbler.start(); int exitVal = proc.waitFor(); return(exitVal); }
public static void traceInstructions(java.lang.Runtime @this, bool doTrace) { }
public static void traceMethodCalls(java.lang.Runtime @this, bool doTrace) { }
public static void gc(java.lang.Runtime @this) { GC.Collect(); }
public static long maxMemory(java.lang.Runtime @this) { return(Process.GetCurrentProcess().MaxWorkingSet.ToInt64()); }
public static long totalMemory(java.lang.Runtime @this) { return(16L << 30); // TODO implement }
public static long freeMemory(java.lang.Runtime @this) { return(Process.GetCurrentProcess().MaxWorkingSet.ToInt64() - Environment.WorkingSet); }
public static int availableProcessors(java.lang.Runtime @this) { return(Environment.ProcessorCount); }