Jump to content
Sign in to follow this  

iexplore.exe steals Memory

Recommended Posts

For example i got script

$IE_Conf = _IECreate("http://www.3k.mail.ru/hunt_conf.php", 0, 1, 0)
While 1
_IENavigate($IE_Conf, "http://www.3k.mail.ru/hunt_conf.php")

Every Navigate action steals half mb of my memory. For example if script works for 5 hours, Alt+Ctrl+Del Memory = about 800 mb...

What to do :D

Share this post

Link to post
Share on other sites

Could try using reduce memory UDF on the IE process.

; AutoIt Version:   3.1.1++
; Description:    Reduce memory usage of process ID (PID) given.
; Syntax:         _ReduceMemory( [ $iPID = -1 [, $hPsAPIdll = 'psapi.dll' [, $hKernel32dll = 'kernel32.dll' ] ] ])
; Parameter(s):  $iPID - PID of process to reduce memory. If -1 reduce self memory usage.
;               $hPsAPIdll - Optional handle to psapi.dll.
;               $hKernel32dll - Optional handle To kernel32.dll.
; Requirement(s):   psapi.dll (Doesn't come with WinNT4 by default)
; Notes:            If @OSVersion = 'WIN_NT4' Then FileInstall('psapi.dll', @SystemDir & '\psapi.dll')
; Author:         w0uter ( w0uter88 [at] hotmail [dot] com / http://www.autoitscript.com/forum/index.php?showuser=4347 )
; Modified by:    Saunders (admin@therks.com)

Func _ReduceMemory($iPID = -1, $hPsAPIdll = 'psapi.dll', $hKernel32dll = 'kernel32.dll')
    If $iPID <> -1 Then
        Local $aHandle = DllCall($hKernel32dll, 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $iPID)
        Local $aReturn = DllCall($hPsAPIdll, 'int', 'EmptyWorkingSet', 'long', $aHandle[0])
        DllCall($hKernel32dll, 'int', 'CloseHandle', 'int', $aHandle[0])
        Local $aReturn = DllCall($hPsAPIdll, 'int', 'EmptyWorkingSet', 'long', -1)

    Return $aReturn[0]

Share this post

Link to post
Share on other sites

Is the issue unique to the webpage you are opening? Does the behaviour change with a very simepl page? What is different when you navigate manually? IE.au3 uses essentially the same methods that IE uses internally when you navigate manually, so I expect no difference.


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...