delorie.com/archives/browse.cgi | search |
Xref: | news2.mv.net comp.os.msdos.djgpp:6275 |
From: | DHGW39B AT prodigy DOT com (Mr. Eric Domazlicky) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Size optimizations? |
Date: | 22 Jul 1996 19:12:24 GMT |
Organization: | Prodigy Services Company 1-800-PRODIGY |
Lines: | 19 |
Distribution: | world |
Message-ID: | <4t0jqo$1a9a@useneta1.news.prodigy.com> |
References: | <4ss0f2$l79 AT harborside DOT com> |
NNTP-Posting-Host: | innugap1-int.news.prodigy.com |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
> C++ .exe file? The reason I ask is that I'm getting sizes of well > over 1 MB for a relatively simple test program that manipulates and > draws some scaled bitmaps (and has no user interface). Sure, I > expected the .exe to be large -- I'm using STL and lots of inline > functions -- but does it have to be this large? Thanks. Watch the size of any global arrays which you allocate statically because they will add to the size of your exe file for instance: char array[64000]; main() {;} seems to make the exe size 64000 bytes longer. I could be wrong but this seems to the case. The solution to this is of course to allocate the array dynamically by using malloc() or new calls. Eric Domazlicky dhgw39b AT prodigy DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |