PDA

View Full Version : Memory Usage Of A Program


Syrinx
10-25-2004, 04:22 AM
I used VC++ 6.0 to compile a very simple win32 "hello workd!" program,and the program used almost 1MB memory as executed.
Why such a program requires such big memory to run?

JoSh
11-08-2004, 10:35 AM
It isn't normal , give us the source code of your hello world.

Grendel
11-08-2004, 02:21 PM
maybe tons of microsoft debug data ?!? :D :D

neoxed
11-08-2004, 05:16 PM
Grendel, do you just post for the sake of posting? Your irrelevant commentary doesn't help answer any questions.

Syrinx, where are you obtaining the information about the memory usage? From the task manager? Assuming you were using the task manager, the "memory usage" column indicates the total amount of memory used by the process (which includes virtual memory). This doesn't indicate how much phsyical memory the process is actually consuming. If your project was a debug build, it also may consume slighty more memory.

Not sure if this answers your question or not. :)

Grendel
11-08-2004, 05:20 PM
#include <stdio.h>

int main() {
printf("Hello World!\n");
return 0;
}



try DEV-C++ (it's free)

http://www.bloodshed.net/

with DEV-C++ v4.9.8.0
the code above results in a 23212 Bytes .EXE

maybe it solves your problem, if VC++ won't do it.

neoxed
11-08-2004, 05:23 PM
Grendel, he was asking about the memory consumption, not executable the size.