Refactored. 
Set size to 2^30+1 for byte[] test.
Set netbeans size to -J-Xms4096m -J-Xmx5120m.