You are trying to allocate 36GB of memory in your āCā model. You are obviously exceeding the
process limits on your machine.
Have you considered using an associative array (or a hash table) where you store index and value for each entry. These are very efficient data structures for sparse memory representations.