FastHelper Posted June 5, 2008 Posted June 5, 2008 Func _ReduceMemory() DllCall("psapi.dll", "int", "EmptyWorkingSet", "long", -1) EndFunc i dont know what this code is for. i thin it will reduce RAM memory to be less used for this program or process memory. or is it for good compression of exe? i need some useful info about it. sorry for my spelling mistakes. its due to be fast !!!
jwseek Posted June 5, 2008 Posted June 5, 2008 http://msdn.microsoft.com/en-us/library/ms682606(VS.85).aspxIt frees up unused memory for the process that you specify.
FastHelper Posted June 5, 2008 Author Posted June 5, 2008 this was not helpful please tell me more about it. sorry for my spelling mistakes. its due to be fast !!!
Developers Jos Posted June 5, 2008 Developers Posted June 5, 2008 Which part was not clear for you after you read the article? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
FastHelper Posted June 5, 2008 Author Posted June 5, 2008 (edited) EmptyWorkingSet FunctionRemoves as many pages as possible from the working set of the specified process.SyntaxBOOL WINAPI EmptyWorkingSet( __in HANDLE hProcess);ParametershProcess A handle to the process. The handle must have the PROCESS_QUERY_INFORMATION and PROCESS_SET_INFORMATION access rights. For more information, see Process Security and Access Rights.Return ValueIf the function succeeds, the return value is nonzero.If the function fails, the return value is zero. To get extended error information, call GetLastError.RemarksYou can also empty the working set by calling the SetProcessWorkingSetSize or SetProcessWorkingSetSizeEx function with the dwMinimumWorkingSetSize and dwMaximumWorkingSetSize parameters set to the value (SIZE_T)1.RequirementsClient Requires Windows Vista, Windows XP, or Windows 2000 Professional.Server Requires Windows Server 2008, Windows Server 2003, or Windows 2000 Server.Header Declared in Psapi.h.Library Use Psapi.lib.DLL Requires Psapi.dll.i dont know what it will do and how it will reduce process memory Edited June 5, 2008 by FastHelper sorry for my spelling mistakes. its due to be fast !!!
jwseek Posted June 5, 2008 Posted June 5, 2008 Removes as many pages as possible from the working set of the specified process.Every process on a Windows computer has a designated amount of system memory assigned to it (which can be expanded as needed - isn't the kernel smart?). The system separates the designated memory into blocks called "pages" where the actual information is stored.This function attempts to shrink the amount memory a particular process is using by looking at the "working set" (the current amount of memory allocated) of pages for that process and trying to cull any unused or empty pages from that working set, thus (hopefully) freeing up some memory to be allocated elsewhere.Overall, it kinda looks like a bit of a hack to combat memory leaks in programs.
FastHelper Posted June 5, 2008 Author Posted June 5, 2008 @ jwseek this is the perfect answer. can it/you do any other hack or trick for RAM Memory? anyway thanks for telling me all this information. sorry for my spelling mistakes. its due to be fast !!!
jwseek Posted June 5, 2008 Posted June 5, 2008 (edited) @ jwseekthis is the perfect answer. can it/you do any other hack or trick for RAM Memory? anyway thanks for telling me all this information.I can't, and if my limited knowledge of system memory allocation is above yours, I wouldn't recommend you do any of these hacks without reading quite a bit more about memory allocation/de-allocation and possibly trying to learn C/C++ for a week or two.But if you're willing to risk your system (messing with this stuff can cause pretty serious problems), then start looking for memory functions in the Windows API documentation on that website I sent you and go nuts. Edited June 5, 2008 by jwseek
ChrisL Posted June 5, 2008 Posted June 5, 2008 There are a few scripts on the Forum using this method. For example. http://www.autoitscript.com/forum/index.ph...amp;#entry93192Do a search you'll find some more [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now