c++: Reduce memory consumption for large static arrays.
PR14179 and the C counterpart PR12245 are about memory consumption of very large file-scope arrays. Recently, location wrappers increased memory consumption significantly: in an array of integer constants, each one will have a location wrapper, which added up to over 500MB in the 14179 testcase. For this kind of testcase tracking these locations isn't worth the cost, so this patch turns the wrappers off after 256 elements; any array that size or larger isn't likely to be interested in the location of individual integer constants. PR c++/14179 * parser.c (cp_parser_initializer_list): Suppress location wrappers after 256 elements.
Showing
Please
register
or
sign in
to comment