[llvm-dev] llvm compile too much memory when i userd global array

mats petersson via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 27 08:31:38 PST 2017


Does it really make a difference what size the array is?

Debug or release build of clang?

--
Mats

On 27 November 2017 at 08:54, 王小小 via llvm-dev <llvm-dev at lists.llvm.org>
wrote:

> hi,all
> when my code like
> ------------------------------------
> * #include<iostream>*
> * #include<string>*
> * using namespace std;*
> * static string s[1000010];*
> * int main()*
> * {*
> * return 0;*
> * }*
>
> ------------------------------------
> And I used clang-5 to compile it, it almost cost 1g memory to compile it.
> how can i reduce the memory , if i don't want change the code?
> thank you
>
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171127/280b7745/attachment.html>


More information about the llvm-dev mailing list