Re: [PATCH newlib] libc/include/malloc.h: Add prototype for GNU extension malloc_usable_size()

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <YjC1CKUmFBS4Axq9@vapier>
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
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmIwtQgACgkQQWM7n+g3
9YFVbA//Wvr0lTfJyWbeNo79V8zCYaJrpyELevqDUZ+6T3+6Vu784fsP2w2/EzNK
q6/X5R6SmCaIw0meSU1bSLVRtz0ZMFHTlwPkuH46D5fKJxRA+/dFKiBByNNZdKoT
tpmUmA+POzasjEoptrbXmXzwIFGqj4Mmr35d1PGeW7ROUdoeMHXluytovEfsQVM3
wiDfn2+mSSgehZWctGnuZw9CmxOW8+myNfMThA2m9ucM/n0kUbIqPHBIC2NatEXv
vBlNpRrJJVHxoF5PkL4q4B3u7ORpW9MeRAZwtevOfPTM2MMH1+kVB/TFt3mU4pz0
446ZeLGi6IEDaHld/98ta45dKfTFOOEu/+e/Es7h97cL47+fehgJ/U/D2eCvwiym
HlhCGQXAgobH+mQwpRkwY+uRKibRCIjavhSUohM8u3V5Fc55aTOSpZQ7qAX6JnWj
9VKGm2wqZFhWolGkVuoWkX3HZqr3vWfpQRtVSWy1VyRxAA5vgerCY/JylnoAiDdu
SlFAnL+gGfJQBT27RsboiLbVDIP59ofmtfMF3xfqF/4v86ZOiyG1nnyYSnRJJgbf
HN2Gsq4WzH6tse7mxUl3Sy24t7+1W+03qpaGr4kRw3kD2InINrSaChM8gwrb+Mc0
tR+gQyqObDjwlgzDoRyuafFXZQ7hNFoQ69IWjW7EqkHEMTL/QSQ=
=AvbY
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.