matrix malloc init