std::bad_alloc

一个服务器程序,长时间运行报错了. ----------- terminate called after throwing an instance of 'std::bad_alloc' what(): St9bad_alloc ----------- 据查为内存不足所致 new 无法分配到相应内存,内存存在泄露. std::bad_alloc is an exception that gets thrown by 'new' when it can't allocate the memory you requested. Something (very likely the standard library containers you are using) is requesting memory, and that memory can't be allocated.
原文地址:https://www.cnblogs.com/lvdongjie/p/4168661.html