in reply to Re^4: Calling a C function using malloc() in a XS
in thread Calling a C function using malloc() in a XS

So there's no memory leaking going on, and no bug - it's just that with 5.6, freed memory stays locked up in the pool, whereas with 5.12 freed memory is being released back to the system.

That can vary based on which memory allocator was selected when Perl was built, and possibly based on the OS. The fact that the two versions of Perl are involved might be incidental.

  • Comment on Re^5: Calling a C function using malloc() in a XS