use of union and stack overflow

bwells

Regular
Joined
Feb 25, 2003
Messages
84
I am writing an unmanaged C++ program.

I am working with some code I was given and a few lines the code are causing a stack overflow when I step into a class method. The lines are as follows:


#define MAX_BLOCK_SIZE 524288

union {
DWORD words[MAX_BLOCK_SIZE];
unsigned char bytes[4*MAX_BLOCK_SIZE];
} buffer;


The DWORD is an unsigned long.

Can someone suggest why this code would cause a stack overflow?
 
Back
Top