| View previous topic :: View next topic |
| Author |
Message |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Wed Oct 09, 2002 7:11 pm Post subject: Reducing VDS memory footprint |
|
|
Although VDS apps aren't necessarily CPU hogs, they do have a fairly sizeable footprint in memory. No matter how simple the script, even if it's idle, it's using at least 4 MB. Is this simply the runtime DLL or something else as well? Has anybody had any success reducing the amount of memory a VDS app uses? Not that 4-5 MB is a concern when you've got 128+ but many of the users where I work are still running on 200MHz/64MB boxes (not their choice, of course). If they're running 4 or 5 of the apps that I've written, it's chewing up a large chunk of resources.
Any insights would be helpful. Thanks!  |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Oct 09, 2002 7:29 pm Post subject: |
|
|
I think the DLL only loads once, after that
it's shared by subsequent VDS apps.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
marty Professional Member


Joined: 10 May 2001 Posts: 789
|
Posted: Wed Oct 09, 2002 7:47 pm Post subject: |
|
|
Unless it has been compressed using Petite Compression, UPX for example... It will reopen the DLL for each instance of your little applications you start. Anyway that's what I understood when Tommy explained it to me.
I think the DLL of VDS version 4.5 isnt compressed...not sure. |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Wed Oct 09, 2002 7:58 pm Post subject: |
|
|
If you use a shared runtime dll, then if one of your programs causes the dll
to crash, any other vds apps using the shared runtime will also crash or
become frozen.
Using the compressed dll of course doesn't have this problem, but then you
end up with more memory used due to several instances of the dll in use.
-Garrett |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri Oct 11, 2002 10:05 pm Post subject: |
|
|
| Marty wrote: | | Unless it has been compressed using Petite Compression, UPX for example... It will reopen the DLL for each instance of your little applications you start. |
| Someone in an eariler thread wrote: | | Quote: | Upon startup of a compressed EXE/DLL, all of the code is decompressed from the disk image into memory in one pass, which can cause disk thrashing if the system is low on memory and is forced to access the swap file. In contrast, with uncompressed EXE/DLLs, the OS allocates memory for code pages on demand (i.e. when they are executed).
Multiple instances of a compressed EXE/DLL create multiple instances of the code in memory. If you have a compressed EXE that contains 1 MB of code (before compression) and the user starts 5 instances of it, approximately 4 MB of memory is wasted. Likewise, if you have a DLL that is 1 MB and it is used by 5 running applications, approximately 4 MB of memory is wasted. With uncompressed EXE/DLLs, code is only stored in memory once and is shared between instances.
Some older virus scanners flag compressed EXE/DLLs as being virus-infected. (This is this reason I stopped compressing Inno Setup's EXEs.) |
|
|
|
| Back to top |
|
 |
|