I was just about to post an update to this thread. Of course headers are not counted in this file size. However the g++ compiler has a strange behavior that was unknown to me. I have tried to initialize a bool array like this: bool arr[N]{true};
The compiler replaces the solitary true with N amount of it. So for example bool arr[10]{true} becomes bool arr[10]{true,true,true,true,true,true,true,true,true,true}
This caused my file to be larger than the limit. I instead used memset to fastly initialize the array.