BrewManNH Posted October 18, 2016 Posted October 18, 2016 _WinAPI_EmptyWorkingSet is not a good idea. It pages data out of memory to the hard drive, which means that it will cause the programs to run slower. Memory is faster than reading/writing from a disk. There's absolutely NO reason to try to reduce virtual memory size, virtual memory is your page file on the hard drive. The only way to reduce virtual memory is to change your page file size, which limits your programs as to how much it can page to the disk. The 2 processes you're trying to accomplish are actually in exact opposition to each other, either you want the data in faster memory or you want it on the hard drive in the page file, trying to reduce both is foolish. masvil 1 If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
masvil Posted October 19, 2016 Posted October 19, 2016 16 hours ago, BrewManNH said: _WinAPI_EmptyWorkingSet is not a good idea. It pages data out of memory to the hard drive, which means that it will cause the programs to run slower. I know what you mean, but I have some infinite loops progressively eating memory. So after some hours they reach a couple of GBs of ram and the hosting machine starts to be negatively affected (of course). I know I should optimize the code instead of doing that _WinAPI_EmptyWorkingSet trick once a minute, but I still can't do it. Do you think this is the case _WinAPI_EmptyWorkingSet is the best temporary choise? Quote There's absolutely NO reason to try to reduce virtual memory size, virtual memory is your page file on the hard drive. I got it, thank you for clarification.
BrewManNH Posted October 19, 2016 Posted October 19, 2016 I don't think it's a good choice for anything. Figure out why you have a memory leak before artificially trying to hide the leak. masvil 1 If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
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