The max length is different in 32bit OS and 64 bit OS.
In a Windows 7 Pro, 64 bit OS, the max length of a byte array is 2147483591. It's "int.MaxValue - 56".
byte[] b = new byte[int.MaxValue-56];
In a Windows 7 Pro, 32 bit OS, the max length of a byte array is 1073741823. It's "int.MaxValue/2".
byte[] b = new byte[int.MaxValue/2];