On Apr 21, 2011, at 10:27 AM, Johannes Schaub (litb) wrote: > Argyrios Kyrtzidis wrote: > >> Author: akirtzidis >> Date: Wed Apr 20 19:27:41 2011 >> New Revision: 129896 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=129896&view=rev >> Log: >> For >> >> double data[20000000] = {0}; >> >> we would blow out the memory by creating 20M Exprs to fill out the >> initializer. >> > > Does this fix designated initializer blowup too? > > double data[20000000] = { [19999999] = 1 };
After r129933, for this case, we will only create 20M pointers and not create the Exprs to fill them out, so from 460MB it will go down to 152MB. Personally, I don't care enough for this case to further complicate the code. Anyone else wanting to do something better is more than welcome! > > Thanks. > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
