DMA allocation of 2D matrix