Re: why does minimizing my app cut mem usage by 90%?

From: Jerry Coffin (jcoffin_at_taeus.us)
Date: 06/27/04


Date: Sun, 27 Jun 2004 12:12:03 -0600

In article <gQNCc.1014$_I3.412@lakeread03>, nobody@cox.net says...
> I have an MFC application that upon startup uses about 20MB of memory
> according to task manager. I noticed that if I minimize the app, memory goes
> down to about 1MB to 2MB and never returns to 20MB even if I restore the
> app.

[ ... ]

> How can I trigger this behavior without programatically minimizing my app
> which looks ugly on the screen.

SetProcessWorkingSetSize(GetCurrentProcess(), -1, -1);

-- 
    Later,
    Jerry.
The universe is a figment of its own imagination.


Relevant Pages

  • Re: best way to track down a memory leak?
    ... time you run your app you start another instance of Word. ... The task manager will tell you what exactly is consuming what. ... > check Task Manager memory usage, ... >> I didn't think it was possible to create a memory leak with VFP, ...
    (microsoft.public.fox.programmer.exchange)
  • Re: why does minimizing my app cut mem usage by 90%?
    ... thanks for pointing it out. ... assertion that the values returned by task manager for program size are essentially ... It is worth pointing out that "minimizing" an app as he desires to do actually doesn't ... minimize its memory footprint; it merely pessimizes its performance, ...
    (microsoft.public.vc.mfc)
  • Re: How to set up a Linux machine that occupies the minimum memory footprint ?
    ... Of course, if you use 8GB of RAM, or more precisely if you ... Are you saying that if I have a 4GB RAM memory, ... Linux will somehow "know" that it doesn't have ... You've said in another message that your app is ...
    (comp.os.linux.setup)
  • Re: How to set up a Linux machine that occupies the minimum memory footprint ?
    ... Of course, if you use 8GB of RAM, or more precisely if you ... Are you saying that if I have a 4GB RAM memory, ... Linux will somehow "know" that it doesn't have ... You've said in another message that your app is ...
    (comp.os.linux.misc)
  • Re: Forms Creation Question
    ... Because the task manager on Pocket PC doesn't actually enumerate the ... it merely creates a list of the captions of all the ... > I show tons of instances of my app opened, only because a bunch of forms ... >>> but if I know that the forms are all created and reside in memory at ...
    (microsoft.public.dotnet.framework.compactframework)