Jump to content

_ReduceMemory()


VicTT
 Share

Recommended Posts

Can anyone give me a link to the latest version of it?I've seen the thread on it and it's fairly confusing..I don't know WHICH is the best version or at least one that works..if anyone could attach the file, I'd be grateful..thanks..

Quote

Together we might liveDivided we must fall

 

Link to comment
Share on other sites

Can anyone give me a link to the latest version of it?I've seen the thread on it and it's fairly confusing..I don't know WHICH is the best version or at least one that works..if anyone could attach the file, I'd be grateful..thanks..

<{POST_SNAPBACK}>

This is the one I use and It works from wouter.

Func _ReduceMemory($i_PID = -1)
    
    If $i_PID <> -1 Then
        Local $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $i_PID)
        Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_Handle[0])
        DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $ai_Handle[0])
    Else
        Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1)
    EndIf
    
    Return $ai_Return[0]
EndFunc;==> _ReduceMemory()

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...