The Perl Data Language uses perl SV's to hold the numeric data (as a string). That gives the simplicity of easy allocation/free since it is done transparently by perl but a side-effect of this approach is that a failure to allocate a very large data object (say, 100s of MiB or more) can make the perl interpreter hit an OOM situation and exit() with no chance of recovery.
I've read about some emergency memory space that can be built into the perl but that seems to be for small items and static in nature. Not what you would use to guard against failure of a 200MiB data allocation. Is there any way to allocate a data region oneself in the XS code and then use that as the data part of the perl SV?
It seems like perl always needs to get its own data. The call of exit() rather than die() means that, for example, running a Perl REPL interactive shell for PDL can crash without recovery. Other suggestions and thoughts on how to handle the problem are welcome!
Thanks much,In reply to die rather than exit on out-of-memory failure? by chm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |