[PATCH newlib] libc/include/malloc.h: Add prototype for GNU extension malloc_usable_size()
Mike Frysinger
vapier@gentoo.org
Tue Mar 15 15:47:20 GMT 2022
On 15 Mar 2022 10:16, Joel Sherrill wrote:
> This is not provided by the newlib malloc implementation but may
> be available in external implementations.
> ---
> newlib/libc/include/malloc.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/newlib/libc/include/malloc.h b/newlib/libc/include/malloc.h
> index a9dc5bca6..e73095e1e 100644
> --- a/newlib/libc/include/malloc.h
> +++ b/newlib/libc/include/malloc.h
> @@ -137,6 +137,10 @@ extern void __malloc_lock(struct _reent *);
>
> extern void __malloc_unlock(struct _reent *);
>
> +#if __GNU_VISIBLE
> +extern size_t malloc_usable_size(void *);
> +#endif
> +
i'm confused. isn't this prototype already defined in this header file
on line 101 above where you added this ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/newlib/attachments/20220315/3891fe6f/attachment.sig>
More information about the Newlib
mailing list