Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22295

Why does the size of the binary executable increase by different amounts for the same block of code?

$
0
0

Let's say I have a C++ program and I compile it using g++. I then get an executable file which, as an example, has a size of 100 kb. I then add a couple of lines of C++ code and compile again and the size of the executable has increased to 101 kb. Then I add the exact same block of C++ code and compile a third time. This time the executable has increased to 106 kb. Why does it happen that the same code sometimes increases the size of the executable by one amount, and another time something much greater?

Also the big increase only happens every couple of times, most of the time it increases by the same, small, amount.


Viewing all articles
Browse latest Browse all 22295

Latest Images

Trending Articles



Latest Images