malloc test for dynamic 2D arrays