qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH v2 01/13] introduce g_autowipe


From: Tony Nguyen
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH v2 01/13] introduce g_autowipe
Date: Tue, 27 Aug 2019 20:46:53 +1000
User-agent: Mutt/1.12.0 (2019-05-25)

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

[Prev in Thread] Current Thread [Next in Thread]