RE: Minimizing executable memory usage

"Keuchel, Rainer" <keuchel-ypdxL0zNX99Wk0Htik3J/[email protected]> Fri, 19 Aug 2005 11:07:53 +0200
Newsgroups gmane.comp.windows.ce.freeware
Message-ID <7252F381626D5A469006C7A8157EAEAC012F3C2E@achb_email.allgeier.net>
> The executable itself, when compiled for Release, is 193,536 
> bytes.  It uses the GDAPIDraw library, which is a DLL of about 350,000
bytes, 
> and the Hekkus Sound DLL 140,000 bytes.

I do not understand why you are talking about code bloat then,
and I doubt that your 8 MEG on Win32 is real memory usage, maybe
it's just reserved virtual mem..

There is a WinCE API function that can be used for measuring overall
memory usage of the system.

  char buf[256];
  MEMORYSTATUS ms;

  memset(&ms, 0, sizeof(ms));
  ms.dwLength = sizeof(ms);

  GlobalMemoryStatus(&ms);

  sprintf(buf, 
	  "Load: %d "
	  "TotalPhys: %d AvailPhys: %d "
	  "TotalPage: %d AvailPage: %d "
	  "TotalVirt: %d AvailVirt: %d",
	  ms.dwMemoryLoad,
	  ms.dwTotalPhys, ms.dwAvailPhys,
	  ms.dwTotalPageFile, ms.dwAvailPageFile,
	  ms.dwTotalVirtual, ms.dwAvailVirtual);



------------------------------------
Visit us at : www.allgeier.com




------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12hrir4lh/M=362335.6886445.7839731.1510227/D=groups/S=1707281942:TM/Y=YAHOO/EXP=1124449915/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/">In low income neighborhoods, 84% do not own computers. At Network for Good, help bridge the Digital Divide!</a>.</font>
--------------------------------------------------------------------~->