On Wed, Feb 25, 2015 at 08:20:37PM -0600, captaindet via Digitalmars-d-learn 
wrote:
[...]
> struct Stuff2Do{
>     static ubyte[1024*1024] buffer4speed = void; // even if untyped at this 
> point
> 
>     // more
> }
[...]

Tangential note: be careful with putting a large static array inside a
struct. Structs are passed by value, which means that if you didn't
allocate that struct on the heap and you pass it around to various
functions, you will overflow your stack very quickly -- every function
call that passes the struct will consume 1MB of stack space. Many OSes
do not allocate that much space for the runtime stack.


T

-- 
Real Programmers use "cat > a.out".

Reply via email to