Hi Maxim,

On Mon, Aug 26, 2019 at 04:50:51PM +0300, Maxim Levitsky wrote:
> 2. is it portable enought for us to use malloc_usable_size
> to get the size of malloced pointer in the autofree callback?
> This function is aviable in glibc (but no wrapper in glib).

We will also need to consider host portability: malloc_usable_size
for Linux, malloc_size for MacOS, _msize for Windows, etc.

[...]

> +#include <stddef.h>
> +#include <malloc.h>

Again host portability, <malloc.h> is not present on MacOS.

Regards,
Tony

Reply via email to