Open
Description
Consider:
$ ulimit -v $((1024*64))
$ python
Python 3.11.9+ (heads/3.11:795f2597a4, Aug 29 2024, 14:29:51) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import flint
>>> a = flint.fmpz(200)<<1000000000
GNU MP: Cannot reallocate memory (old_size=16 new_size=125000008)
Aborted
$
Unfortunately, https://flintlib.org/doc/memory.html page lacks notes like the GMP manual, "13. Custom allocation": "There’s currently no defined way for the allocation functions to recover from an error such as out of memory, they must terminate program execution."
Or this is a flint bug, not a docs issue? It seems, despite fmpz_t is a re-implemented (using low-level mpn_* functions) mpz_t - it shares same memory-management behaviour. In this case it could be possible to carefully propagate memory errors.
Metadata
Metadata
Assignees
Labels
No labels