Answer the question
In order to leave comments, you need to log in
How to setup swap to remove std::bad_alloc?
On the server 500M RAM. I 'm running a resource-hungry application that runs out of memory and crashes with a std::bad_alloc exception .
I connect the swap file to 10G.
Same error.
Conclusionfree -h
_ total used free shared buffers cached
Mem: 488M 125M 363M 6.2M 10M 47M
-/+ buffers/cache: 67M 421M
Swap: 9G 32M 9G
Answer the question
In order to leave comments, you need to log in
Есть вероятность что дело в самом приложении: сколько оно памяти жрало на момент падения и сколько пыталось выделить не успешно?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question