Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public static void traceInstructions(java.lang.Runtime @this, bool doTrace)
 {
 }
Esempio n. 3
0
 public static void traceMethodCalls(java.lang.Runtime @this, bool doTrace)
 {
 }
Esempio n. 4
0
 public static void gc(java.lang.Runtime @this)
 {
     GC.Collect();
 }
Esempio n. 5
0
 public static long maxMemory(java.lang.Runtime @this)
 {
     return(Process.GetCurrentProcess().MaxWorkingSet.ToInt64());
 }
Esempio n. 6
0
 public static long totalMemory(java.lang.Runtime @this)
 {
     return(16L << 30); // TODO implement
 }
Esempio n. 7
0
 public static long freeMemory(java.lang.Runtime @this)
 {
     return(Process.GetCurrentProcess().MaxWorkingSet.ToInt64() - Environment.WorkingSet);
 }
Esempio n. 8
0
 public static int availableProcessors(java.lang.Runtime @this)
 {
     return(Environment.ProcessorCount);
 }