Your program is allocating stack space and other memory for libraries, etc. Task Manager is reporting the size of this allocated memory as well as your executable size.
Is there anyway to reduce this overhead? My program is not very big, and I only include 2 header files, one of which is my own and only about a page long. Can't I tell the compiler that I don't need to allocate that much space for whatever its allocating space for?
I mean, all of my functions are bool except 1, which is a char. Why is it allocating that much space? What can I do? Really, I think 500k is more space than the program will need.
Well if its not too much trouble, could you mind pointing me in the right direction as to where I can find out more about setting the compiler options to minimize size in memory?
I've been able to reduce the executable size down to 8.5KB, but yet the memory size in taskmanager is still 684K, on top of 1.3MB for conhost.exe which is launched automatically.
That's perfectly normal, it doesn't go any lower than that.
Your application needs an initial stack and heap and it always links the C runtime, which does some stuff of its own.
You can use TaskManagerEx to check the virtual memory space of your application.
Here's one of a simple C program that does absolutely nothing at all: http://94.23.22.190/etc/wmmap.png