Jump to content
Sign in to follow this  
Ayres

Using much memory

Recommended Posts

:( I created a program with 136 KBytes (file.exe) that is resident in memory and same using few variables it is occupying 4280 KBytes of memory. Why it will be?

Share this post


Link to post
Share on other sites

:(  I created a program with 136 KBytes (file.exe) that is resident in memory and same using few variables it is occupying 4280  KBytes of memory.  Why it will be?

<{POST_SNAPBACK}>

AFAIK this is a limitation of Autoit. :(

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites

:(  I created a program with 136 KBytes (file.exe) that is resident in memory and same using few variables it is occupying 4280  KBytes of memory.  Why it will be?

<{POST_SNAPBACK}>

The 136k bytes is the size of the program on the disk which is compressed. But as soon it is loaded in memory more things happen to have it in execution. The decompression first and all memory to have the program running which are allocated when the program start.

So as AutoIt need to have a lot of Windows Function working extra memory are needed.

It does not surprised me that 4280 will be allocated to have a script running.

Share this post


Link to post
Share on other sites

The 136k bytes is the size of the program on the disk which is compressed. But as soon it is loaded in memory more things happen to have it in execution. The decompression first and all memory to have the program running which are allocated when the program start.

So as AutoIt need to have a lot of Windows Function working extra memory are needed.

It does not surprised me that 4280 will be allocated to have a script running.

<{POST_SNAPBACK}>

Thanks !

Share this post


Link to post
Share on other sites

ive noticed though that if you minimize the program and then maximize it

the memory usage is lower.i put this in my code just for this plus it gives it

a nice effect when you open the program.Try it.Whether its the right thing

to do i dont know but it does reduce the memory usage.

GUISetState(@SW_SHOWMINIMIZED)
Sleep(1000)
GUISetState()
Edited by therion

Share this post


Link to post
Share on other sites

ive noticed though that if you minimize the program and then maximize it

the memory usage is lower.i put this in my code just for this plus it gives it

a nice effect when you open the program.Try it.Whether its the right thing

to do i dont know but it does reduce the memory usage.

GUISetState(@SW_SHOWMINIMIZED)
Sleep(1000)
GUISetState()

<{POST_SNAPBACK}>

Strange the memory if needed should be allocated to at least a program. I will vote for Windows bad reporting of the allocated memory.

Share this post


Link to post
Share on other sites

Strange the memory if needed should be allocated to at least a program. I will vote for Windows bad reporting of the allocated memory.

<{POST_SNAPBACK}>

Its not bad reporting, its Window's behavior. When a GUI is minimized in Window's, the OS internally calls SetProcessWorkingSetSize(). This trims currently unused memory pages. When restoring the GUI, some new pages are added but there will usually be a decrease in the total compared to before the minimize. Its possible to manually call SetProcessWorkingSetSize() to trim memory at any point.

With that said, to those who think AutoIt is using a lot of memory... well, don't ever open IE, Firefox, Photoshop, Visual Studio, VMware, or about a million other pieces of software which use massive amounts of memory (dozens of MB at least).

Share this post


Link to post
Share on other sites

With that said, to those who think AutoIt is using a lot of memory... well, don't ever open IE, Firefox, Photoshop, Visual Studio, VMware, or about a million other pieces of software which use massive amounts of memory (dozens of MB at least).

<{POST_SNAPBACK}>

See attached screenshot for a perfect example. Firefox has 5 open web pages and is using a whopping 32 MB of memory. Not shown is Winamp, using 14 MB, Paperless Inventory (a work function we use here, developed in house with VB 6.0) weighs in rather heavy too. That all said, the top five (on my system) are:

1. Firefox @ 32

2. Rtvscan @ 22

3. IE @ 19

4. MAINRDW @ 16

5. Winamp @ 16 (combined Winamp @ 14 and the Winamp agent @ 2)

YMMV


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

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...