[Axl] [PATCH] Fix axl memory helpers

Francis Brosnan Blazquez francis at aspl.es
Wed Nov 28 16:57:28 CET 2007

> Hello,


> Currently, as axl_new is coded as an header define, there is a 
> possibility that someone use the library using a different calloc 
> implementation that the one compiled with axl. This will trash the 
> memory when using axl_free on such pointers.
> This is especially true when using axl across dlls.
> The solution is to export axl_calloc (that axl_new uses). This ensures
> that
> ref = axl_new(...)
> axl_free(ref)
> will always work.
> Moreover, as vortex is also reallocating some axl pointers, we need
> to 
> export axl_realloc for the same reasons
> See attached file for the patch on current trunk

The patch looks good and it is now applied. I'm curious, what do you
have in mind on how to implement such application defined allocation

Thanks for the patch, Cheers!

> Bye,
> AMIAUX Benoit

PS: It's your name Amiaux or Benoit?

Francis Brosnan Blazquez <francis at aspl.es>
Advanced Software Production Line, S.L.

More information about the Axl mailing list