Re: Patch: support callback on allocation overflow instead of calling abort()

2020-10-07 Thread Colin Caine
I agree with what I think Marc is suggesting, that we can get a good solution here without accounting for all (or perhaps any) memory leaks. The Julia project doesn't really care about memory leaks in this context anyway. Here's a comment by one of the language designers, Stefan Karpinski (they're

Re: Patch: support callback on allocation overflow instead of calling abort()

2020-10-07 Thread Colin Caine
you can, that this is risky. On Tue, 6 Oct 2020, 15:59 Niels Möller, wrote: > Colin Caine writes: > > > Sorry, this patch was posted to this list last month, but I didn't see it > > in the archives. See here for related discussion: > > https://gmplib.org/list-archives

Re: Patch: support callback on allocation overflow instead of calling abort()

2020-10-06 Thread Colin Caine
Sorry, this patch was posted to this list last month, but I didn't see it in the archives. See here for related discussion: https://gmplib.org/list-archives/gmp-bugs/2020-September/004865.html Though this discussion chain about memory leaks is new :) It's worth noting that this patch is useful to

Patch: support callback on allocation overflow instead of calling abort()

2020-10-06 Thread Colin Caine
This is used by Julia to raise an OutOfMemory exception rather than having the Julia process itself abort. Others on stackoverflow, etc, have experienced similar problems with undesired aborts(), so this patch would probably be useful to a variety of users. (see: https://github.com/JuliaLang/julia