Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Ticket #320 (closed defect: fixed)

Opened 16 years ago

Last modified 16 years ago

big static array initializers in struct literals break

Reported by: ChristianK Assigned to: lindquist
Priority: major Milestone:
Component: backend Version: hg tip
Keywords: static array initializer memory struct literal Cc:

Description

struct S { ubyte[40_000] d; }
void main() {
    S[] a;
    a ~= S();
}

consumes heaps of memory because StructLiteralExp::toElem calls DtoExprValue calls expand_value_to_sarray which builds a static array initializer by creating insert value instructions for each element of the array.

Change History

06/06/09 18:25:26 changed by fvbommel

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in [1479]

Copyright © 2008, LDC Development Team.