当它使用比所需更多的RAM时重新启动Windows应用程序

时间:2015-12-04 16:42:37

标签: c# powershell

我需要制作一种脚本或程序,当它使用比1GB更多的RAM时重启所需的Windows应用程序。我想使用powershell,但却陷入了将给定应用程序的RAM使用变为变量的问题。我尝试了Excel.ActiveSheet.PageSetup.CenterHeader = ...,但这不起作用,因为我只需要这个值。

1 个答案:

答案 0 :(得分:1)

D:\ScalaApps\oos>sbt
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; sup
port was removed in 8.0
[info] Set current project to Proj_oos (in build file:/D:/ScalaApps/oos/)
> compile
[info] Compiling 1 Scala source to D:\ScalaApps\oos\target\scala-2.10\classes...

[error] D:\ScalaApps\oos\src\main\scala\oos.scala:44: value saveAsTextFile is no
t a member of org.apache.spark.mllib.linalg.Matrix
[error]                         metrics.confusionMatrix.saveAsTextFile("D:/spark
4/confMatrix2")
[error]                                                 ^
[error] one error found
[error] (compile:compileIncremental) Compilation failed
[error] Total time: 5 s, completed Dec 5, 2015 9:21:03 AM
>

只会给你价值。但我想你最好修复内存泄漏。

What are ways to solve Memory Leaks in C#

What strategies and tools are useful for finding memory leaks in .NET?

How to use IDisposable to fix memory leaks

等等