what(): std::bad_alloc - am I out of memory?

前端 未结 1 836
难免孤独
难免孤独 2021-01-20 23:38

My dataset: 500,000 points in 960 dimensions. The size of the file is 1.9 GB (1,922,000,000 bytes).

The code works for smaller data sets, but for this it will crash in t

相关标签:
1条回答
  • 2021-01-21 00:11

    std::bad_alloc means a problem with allocating a memory - so yes, you're most likely out of memory. Unfortunately, there is no a reliable way to "handle" this kind of exception - you can catch it and gratefully exit application.

    0 讨论(0)
提交回复
热议问题