Board index » delphi » Small App runs and Take 2.5 MB!

Small App runs and Take 2.5 MB!

I have a small appthat has 1 form and 3 labels.  It also has 1 TCP, 1 Timer
and 1 Popup component.

  It barely has any code in it..  I just use it to find out my IP address
but when it runs Windows NT 4.0 tells me through the Task manager that This
process takes 2308 KB!  Is there something I am doing wrong ?

  I can make my source code available if you are curious....

  Please tell me the trick to make this app run and use a little bit less
memory...

Eric
e...@jodoin.com

 

Re:Small App runs and Take 2.5 MB!


Don't use the forms unit. Try using another unit, or write a console mode
app.

--

Janus N. T?ndering
Email: janusnt<alpha>usa<dot>net
Please correct my email address if you
want to mail me....thanks

Quote
Tob wrote in message <35760c1...@204.239.181.11>...
>I have a small appthat has 1 form and 3 labels.  It also has 1 TCP, 1 Timer
>and 1 Popup component.

>  It barely has any code in it..  I just use it to find out my IP address
>but when it runs Windows NT 4.0 tells me through the Task manager that This
>process takes 2308 KB!  Is there something I am doing wrong ?

>  I can make my source code available if you are curious....

>  Please tell me the trick to make this app run and use a little bit less
>memory...

>Eric
>e...@jodoin.com

Re:Small App runs and Take 2.5 MB!


Check that you haven't included debug info in your exe. This is
certainly the cause. It should be about 1/5 the size if you take the TDW
debug info out. You may need to delete the exe, and dcu's and do a
complete rebuild.

MH.

Quote
Tob wrote:

> I have a small appthat has 1 form and 3 labels.  It also has 1 TCP, 1 Timer
> and 1 Popup component.

>   It barely has any code in it..  I just use it to find out my IP address
> but when it runs Windows NT 4.0 tells me through the Task manager that This
> process takes 2308 KB!  Is there something I am doing wrong ?

>   I can make my source code available if you are curious....

>   Please tell me the trick to make this app run and use a little bit less
> memory...

> Eric
> e...@jodoin.com

--
***********************************************
Martin Harvey
Uni email: mc...@cam.ac.uk <EXPIRES 13/7/98>
Home email: mc...@harvey27.demon.co.uk
Web pages: http://www.harvey27.demon.co.uk/mch24/
***********************************************

Re:Small App runs and Take 2.5 MB!


The code you wrote for your application itself may be rather small, but you
must realize that there is also thousands of lines of code in the Forms
unit, as well as the size of the TCP OCX control.  Any memory that the TCP
allocates is included in the amount of memory that your runs in, and may not
be as obvious.

Oracle
Programming Concepts and Tutorials
www.geocities.com/SiliconValley/Haven/7959/

Re:Small App runs and Take 2.5 MB!


Quote
On Wed, 3 Jun 1998 19:45:04 -0700, "Tob" <ejod...@inetex.com> wrote:
>I have a small appthat has 1 form and 3 labels.  It also has 1 TCP, 1 Timer
>and 1 Popup component.

>  It barely has any code in it..  I just use it to find out my IP address
>but when it runs Windows NT 4.0 tells me through the Task manager that This
>process takes 2308 KB!  Is there something I am doing wrong ?

>  I can make my source code available if you are curious....

>  Please tell me the trick to make this app run and use a little bit less
>memory...

   I read about the fact that Win95 'shares' the system controlling
program while NT will have a total seperate copy of the whole system,
i.e. a 'real' virtual machine.  That's why you can't crash the system.
But in 95, a faulty program overwrites the system and will bring the
whole thing down.

  It may be part of the reason why your app needs so much memory.
  You may verify this by running your app in Win95 and tell us the
difference.

Re:Small App runs and Take 2.5 MB!


Eric,
do you have any images on the forms? - even a few high quality button
images can add and add and add !!

- A.

Re:Small App runs and Take 2.5 MB!


La fonction suivante me permet de lire le nom du fichier cible, mais ne
me permet pas d'accder l'Absolute path . Une suggestion serait la
bienvenue, mais peut-tre y-t'il galement beaucoup plus simple ?

function ShowPathLink(LnkFile : String):string;
var
  ipf     : IPersistFile;
  isl     : IShellLink;
  aws     : array[0..MAX_PATH] of WideChar;
  pfd     : TWin32FindDataA;
begin
  MultiByteToWideChar(CP_ACP, 0, PChar(LnkFile), {charge aws avec le
nom}
                      -1, @aws, MAX_PATH);       {du raccourci        

Quote
}

  isl := CreateComObject(CLSID_ShellLink) as IShellLink;
  isl.QueryInterface(IPersistFile, ipf);
  ipf.Load(aws, 0);                              {charge l'objet =
lecture}
                                                 {du contenu du
.lnk      }
  isl.GetPath(PChar(LnkFile), MAX_PATH, pfd, SLGP_UNCPRIORITY);
  Result  := pfd.cFileName;
end;

____________________________________________________
Avec mes remerciements,

E-mail   :  Fr.Guillem...@wanadoo.fr
Web site :  http://perso.wanadoo.fr/fr.guillemart/

Re:Small App runs and Take 2.5 MB!


Eric,

This is actually not a realistic number. If you run your app,
look at the memory used in NT's Task Manager, minimize your app,
and look at the number, you'll see it has shrunk to almost
nothing. Then restore your app, and you'll see a memory use
value way less than you had when the app first started.

HTH

Ken
--
Ken White
kwh...@westelcom.com

Clipper Functions for Delphi
http://members.aol.com/clipfunc/

Quote
Tob wrote:

> I have a small appthat has 1 form and 3 labels.  It also has 1 TCP, 1 Timer
> and 1 Popup component.

>   It barely has any code in it..  I just use it to find out my IP address
> but when it runs Windows NT 4.0 tells me through the Task manager that This
> process takes 2308 KB!  Is there something I am doing wrong ?

>   I can make my source code available if you are curious....

>   Please tell me the trick to make this app run and use a little bit less
> memory...

> Eric
> e...@jodoin.com

Re:Small App runs and Take 2.5 MB!


I read, but have not tried, the following:

FreeLibrary(GetModuleHandle('OleAut32'));

It may apply to your situation, assuming your app does not use OLE.

Paul

Quote
"Tob" <ejod...@inetex.com> wrote:
>I have a small appthat has 1 form and 3 labels.  It also has 1 TCP, 1 Timer
>and 1 Popup component.

>  It barely has any code in it..  I just use it to find out my IP address
>but when it runs Windows NT 4.0 tells me through the Task manager that This
>process takes 2308 KB!  Is there something I am doing wrong ?

Other Threads