Article View: cis.winnt.general
Article #173HELP: Why is my app so large?
From: AndyB
Date: Fri, 27 Feb 1998 00:00
Date: Fri, 27 Feb 1998 00:00
49 lines
2429 bytes
2429 bytes
Hi. I have a sockets application that I'm trying to make as small as
possible. I have 3 versions of the app: console (debugging version), gui
(hidden window for 95), and service (for nt).
All three versions of the app use 1500K of memory (according to NT Task
Manager) when first started.
However, the console debugging version jumps down to 248K (and stays there)
when I minimize the console window. Which is weird, because the console
debugging version uses a few more printf statements than the other versions!
All three apps are almost exactly the same (except for the startup
procedure--WinMain vs. main vs. StartServiceCtrlDispatcher, etc.). I've
looked at the modules each version of the app loads--all versions load
exactly the same DLLs (as follows):
ntdll.dll
MSVCRT.dll
KERNEL32.dll
WSOCK32.DLL
WS2_32.dll
USER32.dll
GDI32.dll
ADVAPI32.dll
RPCRT4.dll
WS2HELP.dll
rnr20.dll
rasadhlp.dll
rpcltc1.dll
msafd.dll
wshtcpip.dll
The only difference is the that the service version and the gui version also
load "wshisn.dll".
In my application, I don't link with anything (no user32.lib, no gdi32.lib,
etc.), and I dynalink to WSOCK32.DLL at run-time (and FreeLibrary it when I
don't need it). I suspect that the other DLL's are loaded by WSOCK32 and
(perhaps) MSVCRT.
Since all three versions of the app load the same DLLs (and have the same
code base), I'm trying to figure out why the console version jumps down to
248K when I minimize the DOS box.
Any ideas on why this happens (and how I can make it happen in the gui and
service versions of the app) are greatly appreciated. I've tried just about
everything I can think of, including rolling my own RTL for static linking.
AndyBruce@theprogrammers.com
Technical Details
Message-ID:
<6d6iv8$8he$1@winter.news.erols.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb96d,3bc47a9713efbde2,start X-Google-Attributes: gidfb96d,public From: "AndyB" <AndyBruce@msn.com> Subject: HELP: Why is my app so large? Date: 1998/02/27 Message-ID: <6d6iv8$8he$1@winter.news.erols.com> X-Deja-AN: 329140728 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 X-Complaints-To: abuse@erols.com X-Trace: winter.news.erols.com 888590120 8750 207.172.45.210 (27 Feb 1998 14:35:20 GMT) Organization: Erol's Internet Services Newsgroups: cis.winnt.general