C# C与Ram优化

C# C与Ram优化,c#,optimization,autoit,ram,C#,Optimization,Autoit,Ram,使用AutoIt,您可以使用以下代码优化应用程序的RAM使用。这在C中是如何设置的 Func _ReduceMemory($iPid) Local $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $iPid) Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet'

使用AutoIt,您可以使用以下代码优化应用程序的RAM使用。这在C中是如何设置的

Func _ReduceMemory($iPid)
    Local $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $iPid)
    Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_Handle[0])
    Return $ai_Return[0]
EndFunc

请不要。除非您使用的是Windows 95。请阅读:


您可以使用,以便从C调用非托管dll。

Dude,这是我编写的C应用程序上面的autoit代码,我对RAM的使用进行了显著优化。从25 MB降至2 MB。这就是如果你能做到的话,为什么我要用另一种语言。我想从你那里得到的DLL C的使用说明。这不会优化任何东西。