You're allocating way too much memory for your computer (unless you have a huge amount of memory).
See this godbolt example, the computation shows that on their hardware you would be trying to allocate 96GB of memory!
If this is an exercise, maybe you have a typo somewhere on the size you have to allocate?
If not, you can try to replace the std::string to indexes/pointers to where the strings are stored. It should save some memory, but you'll still have issues. Otherwise you'll have to process the data differently, by processing it in chunks.
If you're using C++, why are you using calloc? You could simply have std::vector<company> companies(m); and that will allocate the memory AND construct all your objects. Less error-prone, and more readable.
auto a = new Company[m];std::vector<Company> a(m);.std::stringis something like 24 or 32 bytes on 64-bit architecture. Are you aware that you are allocating 72 or 96 GB? How much RAM do you have?