http://d.puremagic.com/issues/show_bug.cgi?id=4984
--- Comment #1 from Jonathan M Davis 2010-10-03 03:52:31
PDT ---
This is worse than I thought. The problem has nothing to do with the mixin at
all. Maybe constructing the string for the mixin helps make dmd run out of
memory, maybe not, but the find() is enough to do it. Take this program for
instance
import std.algorithm;
void main()
{
string str = "my string";
auto found = find(str, ";", "{", "}", "\\\"", "\"", "//", "/+", "+/", "/*",
"*/", "unittest", "import");
}
It runs out of memory just fine on its own, without the mixin. find() is going
to be rather limiting if it can't be used with more than a few possible
needles. Granted, the most typical use case is a single needle, but dmd really
should be able to handle a more or less arbitrary number of needles (though
obviously something like 100 needles wouldn't necessarily be reasonable). In
any case, 12 needles is enough. If I remove one and make it 11, then a
ridiculous amount of memory is used, but at least dmd doesn't run out. With 12,
it does.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---