http://d.puremagic.com/issues/show_bug.cgi?id=1382
Rob Jacques <sandf...@jhu.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sandf...@jhu.edu --- Comment #7 from Rob Jacques <sandf...@jhu.edu> 2010-12-06 12:09:04 PST --- I just came across this bug while working on improving std.variant: the combination of templates + ctfe + unittests resulted in out of memory errors. I've also traced down another issue (I don't know if it should be filed separately or not): It appears that _any_ access of an array variable allocates ram, resulting in drastically slower compile times (+55 seconds) and excess memory usage (30+ mb in this case using DMD 2.050) string ctfeTest() { char[] result; result.length = ushort.max; char c; for(size_t i = 0; i < result.length; i++) {} // Allocates for(size_t i = 0; i < ushort.max; i++) {} // Doesn't allocate for(size_t i = 0; i < ushort.max; i++) { // Allocates c = result[i]; } for(size_t i = 0; i < ushort.max; i++) { // Doesn't allocate c = cast(ubyte)('A' + i%26); } return cast(string)result; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------