in reply to Re^2: Perl with Swig C module not releasing memory
in thread [Solved] Perl with Swig C module not releasing memory

http://en.wikipedia.org/wiki/Wag_%28disambiguation%29

WAG, an acronym for "wild ass guess", an estimate based on experience or similarity

Use readmore tags to post long code, dont force the moderators to do it for you. To find out if perl redefined your malloc/free functions, make a .i file from the SWIG outputted .c file. It will be half a MB so don't post the whole thing here, just an function or 2. Your Malloc macro will be expanded to the actual C func symbol that will be called, which might be a perl allocator, not your C compiler's malloc.
  • Comment on Re^3: Perl with Swig C module not releasing memory

Replies are listed 'Best First'.
Re^4: Perl with Swig C module not releasing memory
by megaframe (Novice) on May 10, 2013 at 23:14 UTC

    You are correct XSUB.h in the CORE files is what's redefining free() to PerlMem_free and the memory isn't getting released.

    Still trying to figure out how to keep that from happening.