View previous topic :: View next topic |
Author |
Message |
AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1251
|
Posted: Wed Jul 31, 2019 8:33 am Post subject: Select the maximum memory as the currently valid process.[S] |
|
|
As the research period was extended, there was a need to ask.
Uncle Google is not very descriptive.
Only for the current memory question: there is garbage collection
So instead of "Name" and "ID",
Is it possible to select the most memory consuming process?
So: How do I get a list of Windows CPU memory.
And how do I select the highest memory from this list as the current process?
Thanks in advance for the help.
_________________
Last edited by AylinCE on Wed Jul 31, 2019 11:05 am; edited 1 time in total |
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1251
|
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Wed Jul 31, 2019 2:37 pm Post subject: |
|
|
2. you can just call tasklist and it will give everything, I don't believe it has an option to give it multiples of the same filter type so you'd just have to filter it yourself, the first thing in the info is the process name.
1. /shrug maybe an off by one issue in the getMemory function, I didn't really use it myself, someone else had asked for it so I wrote that and haven't looked at it since lol
hm, testing it myself I did notice it failing to get the pid and memory correctly in some cases causing an error when it tried to do math with a nil value, using local name, pid, mem = info:match('(%S+)%s+(%d+)%s+%S+%s+%d+%s+(.+)') instead fixed that and in my testing it was able to get the largest chrome process. It's also possible that tasklist and task manager calculate the memory values differently for some reason... wouldn't put it past Windows lol
_________________
|
|
Back to top |
|
|
|