Sign in to follow this  
Followers 0
VicTT

_ReduceMemory()

5 posts in this topic

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[/quote]

Share this post


Link to post
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.

 

Share this post


Link to post
Share on other sites

Thanks for the quick reply..Appreciate it :)


[quote]Together we might liveDivided we must fall[/quote]

Share this post


Link to post
Share on other sites

Instead of starting a new thread, you probably should have just replied to the original. But too late now.

Share this post


Link to post
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
Sign in to follow this  
Followers 0