Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to make MFC apps use less RAM?

How to make MFC apps use less RAM?

Scheduled Pinned Locked Moved C / C++ / MFC
c++performancecssalgorithmshelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mike NET
    wrote on last edited by
    #1

    Are there any optimization options (or compiler switches) that would decrease amount of memory required by Release build of MFC apps? I know that memory consumption should be the least concern in these days, but I have small SystemTray app., and it eats quite a bit of RAM. The answer to my problem is to *not* use MFC to write SystemTray application, but writing in C++, would seem bit barbaric. If there are no optimization options or compiler switches to minimize memory consumption, is there a method that at least would tell Windows OS to use *page file*, while the program is inactive? thanks in advance Mike

    S 1 Reply Last reply
    0
    • M Mike NET

      Are there any optimization options (or compiler switches) that would decrease amount of memory required by Release build of MFC apps? I know that memory consumption should be the least concern in these days, but I have small SystemTray app., and it eats quite a bit of RAM. The answer to my problem is to *not* use MFC to write SystemTray application, but writing in C++, would seem bit barbaric. If there are no optimization options or compiler switches to minimize memory consumption, is there a method that at least would tell Windows OS to use *page file*, while the program is inactive? thanks in advance Mike

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      Starting at the end, you don't have to *tell* windows to use the page file, it will do so on it's own; not sure what algorithm it uses to determine what blocks to swap out, but i'm sure as long as your program is sitting quietly, it will Do The Right Thing. :) If you want to try using something other than MFC, ATL+WTL sounds like it might be a good choice. Don't use it myself though, so can't say for sure. Finally, a quick-and-easy way to go would be to compile using MFC as a shared library, and use some of the tips given in these articles: http://www.codeproject.com/tips/reducesixeexe.asp http://www.codeproject.com/tips/aggressiveoptimize.asp And if words were wisdom, I'd be talking even more.

      The Offspring, I Choose

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups