Skip to content

Handle bad_alloc's when allocating memory in Column

Alexander Semke requested to merge work/spreadsheet_memory_handling into master

This MR addresses problems as for example those described in #322 (closed).

Even though there are many places in the code where we can fail when the system doesn't have any memory left (easy to reproduce with limiting the amount of memory for labplot's process with 'prlimit') the chances to run into out-of-memory situations for many cases with small allocations are very unlikely since the kernel is over-committing the memory and can handle many such situations usually. This is not the case when bigger amount of data is request at once which is happening for example when we start writing data into a big spreadsheet.

The MR adds some handling for the bad_alloc's in RandomValuesDialog and in EquidistantValuesDialog as well as in Column. More places in the code can be addressed later over time accordingly but for now we take care of the most obvious and likely events like in #322 (closed).

fix #322 (closed)

Edited by Alexander Semke

Merge request reports