On Tue, 2023-02-14 at 13:57 +0100, Sagar Acharya wrote: > Point of a compiler is to convert C code to machine code of > hex/binary/object file in least amount of time and conserving as much > memory as can be done. A compiler needs to take a balance between compiling speed & memory consumption and the speed & memory consumption of the generated code. GCC prefers to make better generated code, as long as no quadratic behavior exists during compile time. > The values of memory required are definitely not of order 1GB. There > are OSes which can be booted in less than 100MB. You can find another compiler if you really need one for a small device. Or you can submit some patches to improve the speed & memory footprint of GCC (or hire somebody to do) as long as you don't hurt the generated code. "You think what it should be" is not "what it should be". -- Xi Ruoyao <xry111@xxxxxxxxxxx> School of Aerospace Science and Technology, Xidian University