An empty program that does nothing in C++ needs a heap of 204 KB, but not in C
Consider this empty program: int main() { return 0; } If I compile it with C++ with g++ main.cpp && strace ./a.out , and analyze the output with strace , I observed that the last lines of the output are (you can add -O3 that the effect is the same): mprotect(0x7f71af154000, 45056, PROT_READ) = 0 mprotect(0x7f71af38b000, 4096, PROT_READ) = 0 brk(NULL)