Manage massive matrices with shared memory and memory-mapped