You are trying to allocate 60 xlsmain that contain 12,000 sub_parts_of_interface , which contain 120,000 pio_subparts , which contain 3,840,000 corners , which contain 192,000,000 file_structure , which contain 3,840,000,000 reportspecs , and you did not specify the definition of reportspecs . Thus, you are trying to allocate 3.8 billion things and run out of memory.
This is because the system you are running on does not have enough memory to store the objects you are trying to allocate.
If these structures contain arrays, because structures can contain these objects, but usually they do not contain maxima, then get rid of arrays and replace them with std::vector (in C ++) or pointers (in C or C ++). Using any method, you will use just the space for the actual objects, as well as some overhead, instead of using the space for the maximum possible theoretical. std::vector allows you to add elements as needed, and the std::vector application takes care of allocating the necessary memory. With pointers, you have to allocate and free up space yourself.
source share