Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Minimizng memory use

Status
Not open for further replies.

neutrino

Technical User
Feb 6, 2002
4
0
0
GR
I need to know some tip for minimizing memory that my application will use (I am talking about RAM). For instance, I have this simple program :

uses Windows;

begin

Sleep(INFINITE);

end;

When I compile it with all debug options off, I get about 30K exe that use about 900 K of RAM. That is a lot. The same program compiled in VC 6 is taking about 500K. It's still a lot, but its better. I noticed that when you minimize Windows Commander (that is - my guess - written using Delphi) it's memory usage becomes between 150 and 400K opposite to 1.5MB when it is active. So, there must be some way to do this. I expect that some normal value for upper program should be bellow 500K.

Thanks.
 
I get only 520K in the RAM. Are you sure that you turned all the debug option? What abt linking without the debug symbols? Are the optimizations turned on?

The executable is only 15K!

regards Welcome to the Pythian Games!
Long live Godess Athena!
dArktEmplAr of Delphi Oracle
 
RAM problems may be linked to your exe size, because you have included too many libraries.

I normally take out all packages which i do not use in the project -> options, and recompile. The Exe is smaller and also the RAM usuage is less.

Note there is a limit, because Delphi runtime components and base code is needed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top