On Sat, 11 Apr 2020 at 21:04, relliott--- via Gcc-help <gcc-help@xxxxxxxxxxx> wrote: > > Hello, > > I’m seeing gcc memory usage exceed 15GB when compiling a source file generated from the command: > > % xxd -i file.txt > > where ‘file.txt’ is a 170MB file. > > Is there a way to avoid this high memory usage? Can anyone explain why it occurs? Because the compiler is parsing an array initializer with millions of elements.