Re: High memory usage compiling large ‘xxd -i’ output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux