Astroua / CARTAvis

Deprecated Repository for CARTA project. Refer to:
https://github.com/cartavis/carta
GNU General Public License v2.0
2 stars 7 forks source link

preallocate space for copy of data and list of corresponding indices,… #186

Closed confluence closed 8 years ago

confluence commented 8 years ago

… to avoid running out of memory unnecessarily during dynamic allocation

This change helps to mitigate issue 185 (bad_alloc being thrown when these vectors are resized dynamically during the copy).

Is there a better way to calculate the maximum total size of the data than multiplying the dimensions together?