PRF005
Large array on stack
Object Pascal — Delphi & Free Pascal
Warning
Performance
Large fixed-size arrays on the stack risk stack overflow, especially in recursive methods
large fixed-size arrays on the stack risk stack overflow, especially in recursive methods.
Why this severity
large fixed-size arrays on the stack risk stack overflow, especially in recursive methods.
Known false positives
arrays in the main procedure with a known-safe stack size.
Remediation example
var Buffer: TArray<Byte>; begin SetLength(Buffer, 4096);
Related Performance rules