If you allocate the result area of 1x+1x through GA, you have to make
sure that you
1. do not free the result yourself anywhere
2. increment the usecount whenever you install the result into a
recursive XNUM (and if you install it more than once, increment each time)
3. derement the usecount whenever you remove the result from a recursive
XNUM
4. do not use the result block again after you return the XNUM
MEMAUDIT has been used a lot & I don't think it is the culprit here; I
could be wrong.
If you can come up with a repeatable failing case, let me know.
hhr
On 11/11/2023 12:27 PM, Raul Miller wrote:
The value 12345x is being allocated through gmp. The c char sequence
12345\0" is also being allocated through gmp.
But this is no longer an interesting example, because - as you pointed
out - it's being freed properly.
So that brings me back to the new problem introduced by having the
result of 1x+1x being allocated using J's memory allocator. It's this
failure mode that potentially implicates something in the MEMAUDIT
infrastructure.
That said, this is also slow going - both reviewing the code and
running tests to exhibit the failure mode take quite a lot of time.
So, at this point, I'm trying to focus on issues which might reduce
some of that time.
Thanks,
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm