| View previous topic :: View next topic |
| Author |
Message |
silkcom
Joined: 23 Jan 2008 Posts: 96
|
Posted: Thu Jul 03, 2008 3:26 pm Post subject: Run function has a memory leak |
|
|
Does anyone know why the Run function uses up so much ram?
My script starts at 2 meg, I run a program, and it jumps to 6. I run another, and it's 8, then 9, etc. Not always the same, but it never clears that memory out. It seems to max out somewhere around 9 or 10.
any ideas? |
|
| Back to top |
|
 |
Red Hat Boy
Joined: 10 Apr 2008 Posts: 113
|
Posted: Thu Jul 03, 2008 7:42 pm Post subject: |
|
|
I notice that when I use the run command, it does jump up, but only slightly. My script starts at around 2200k and never goes higher than around 2800k. Are you using an older version? _________________ I slit the sheet, the sheet I slit,
and on the slitted sheet I sit. ;~} |
|
| Back to top |
|
 |
ahklerner
Joined: 26 Jun 2006 Posts: 1205 Location: USA
|
Posted: Thu Jul 03, 2008 7:50 pm Post subject: |
|
|
| Red Hat Boy wrote: | | Despite popular belief, I am not high. |
That's some funny shite there. _________________
 |
|
| Back to top |
|
 |
silkcom
Joined: 23 Jan 2008 Posts: 96
|
Posted: Thu Jul 03, 2008 7:54 pm Post subject: |
|
|
| I might be, 1.0.47 or something like that |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 5890
|
Posted: Thu Jul 03, 2008 7:56 pm Post subject: Re: Run function has a memory leak |
|
|
| silkcom wrote: | Does anyone know why the Run function uses up so much ram?
My script starts at 2 meg, I run a program, and it jumps to 6. I run another, and it's 8, then 9, etc. |
How do you see the memory usage ? With Windows Task Manager ?
If your are so concerned about it, call EmptyMem() after the Run command.
| Code: | EmptyMem(PID="AHK Rocks"){
; Heresy : http://www.autohotkey.com/forum/viewtopic.php?t=32876
pid:=(pid="AHK Rocks") ? DllCall("GetCurrentProcessId") : pid
h:=DllCall("OpenProcess", "UInt", 0x001F0FFF, "Int", 0, "Int", pid)
DllCall("SetProcessWorkingSetSize", "UInt", h, "Int", -1, "Int", -1)
DllCall("CloseHandle", "Int", h)
} |
| Quote: | | Not always the same, but it never clears that memory out. It seems to max out somewhere around 9 or 10. |
I have seen one my of AHK script use over 600MB.. and Windows resets it before the physical memory id exhausted..
 _________________ SKAN - Suresh Kumar A N |
|
| Back to top |
|
 |
silkcom
Joined: 23 Jan 2008 Posts: 96
|
Posted: Thu Jul 03, 2008 8:47 pm Post subject: |
|
|
| Can you explain what this is doing? |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 5890
|
Posted: Thu Jul 03, 2008 8:59 pm Post subject: |
|
|
| silkcom wrote: | | Can you explain what this is doing? |
No! .. but maybe you could understand from the conversation between Heresy & Sean
 _________________ SKAN - Suresh Kumar A N |
|
| Back to top |
|
 |
silkcom
Joined: 23 Jan 2008 Posts: 96
|
Posted: Thu Jul 03, 2008 9:49 pm Post subject: |
|
|
Very excellent. I figured out what it was doing, just looked a little confusing at first.
This is wonderful, keeps my script at about 600k memory, and drops it back to that everytime i use the run command. |
|
| Back to top |
|
 |
|