Quantcast
Channel: Embarcadero Community - Embarcadero Community
Viewing all articles
Browse latest Browse all 3212

STL's string could not allocate memory

$
0
0

Dear all, Good day or night!   Did anyone have troubles with memory allocation for std::string? Actually this could happen with any other type, not a string only. This happens when I take a substring (substr method). It worked all the time on taking substrings from millions or billions of strings, but now it could not and a kind of memory allocation error appears. The arguments are ok, no problems from this part. My program is constantly increasing the number of objects involved in it. And now when I started to add more objects this error happened. For the time being I'm not using multithreading and in memory my program took around 1.8 GB. Computer's parameters are: Physical memory (available): 26239 MB, Number of CPUs: 24, . With such configuration memory allocation should not be a problem at all. Maybe I should use multithreading in order to solve this problem?   Thank you in advance for any help or suggestion.   Regards, Bakhtiyar  


Viewing all articles
Browse latest Browse all 3212

Trending Articles