Changing default alloc routines in C

Mayank Chaudhary <[email protected]> Thu, 15 Dec 2022 10:55:41 +0530
Newsgroups gmane.comp.programming.swig
Message-ID <CAAKn+iCnvnhCtbYj5gqAkG2XywuNVbti0nz=ScRUj+O08O0ApQ@mail.gmail.com>
Hi, I'm new to swig and am generating C wrappers using it.

Swig uses default malloc and calloc functions for memory allocations while
generating wrappers. Is there any way where I can specify a custom
allocation function in the interface file and use that instead of malloc
and calloc?

*For example - something like my_malloc, my_calloc and my_free or any
custom func(I have defined these functions in a separate file) to be used
everywhere instead of malloc, calloc and free*

I tried typemaps and renaming functions but that didn't work.

Requesting your support.

Thanks & Regards,
Mayank

_______________________________________________
Swig-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/swig-user