Re: [PATCH] Return NULL for zero size allocations

2021-05-05 Thread Joel Sherrill
On Wed, May 5, 2021 at 9:48 AM Gedare Bloom wrote: > On Wed, May 5, 2021 at 1:19 AM Sebastian Huber > wrote: > > > > On 05/05/2021 09:00, Chris Johns wrote: > > > On 5/5/21 4:58 pm, Chris Johns wrote: > > >> On 5/5/21 4:52 pm, Sebastian Huber wrote: > > >>> In POSIX, zero size memory allocations

Re: [PATCH] Return NULL for zero size allocations

2021-05-05 Thread Gedare Bloom
On Wed, May 5, 2021 at 1:19 AM Sebastian Huber wrote: > > On 05/05/2021 09:00, Chris Johns wrote: > > On 5/5/21 4:58 pm, Chris Johns wrote: > >> On 5/5/21 4:52 pm, Sebastian Huber wrote: > >>> In POSIX, zero size memory allocations are implementation-defined > >>> behaviour. The implementation ha

Re: [PATCH] Return NULL for zero size allocations

2021-05-05 Thread Sebastian Huber
On 05/05/2021 09:00, Chris Johns wrote: On 5/5/21 4:58 pm, Chris Johns wrote: On 5/5/21 4:52 pm, Sebastian Huber wrote: In POSIX, zero size memory allocations are implementation-defined behaviour. The implementation has two options: https://pubs.opengroup.org/onlinepubs/9699919799/functions/m

Re: [PATCH] Return NULL for zero size allocations

2021-05-05 Thread Chris Johns
On 5/5/21 4:58 pm, Chris Johns wrote: > On 5/5/21 4:52 pm, Sebastian Huber wrote: >> In POSIX, zero size memory allocations are implementation-defined >> behaviour. The implementation has two options: >> >> https://pubs.opengroup.org/onlinepubs/9699919799/functions/malloc.html >> >> https://pubs.o

Re: [PATCH] Return NULL for zero size allocations

2021-05-04 Thread Chris Johns
On 5/5/21 4:52 pm, Sebastian Huber wrote: > In POSIX, zero size memory allocations are implementation-defined > behaviour. The implementation has two options: > > https://pubs.opengroup.org/onlinepubs/9699919799/functions/malloc.html > > https://pubs.opengroup.org/onlinepubs/9699919799/functions

[PATCH] Return NULL for zero size allocations

2021-05-04 Thread Sebastian Huber
In POSIX, zero size memory allocations are implementation-defined behaviour. The implementation has two options: https://pubs.opengroup.org/onlinepubs/9699919799/functions/malloc.html https://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_memalign.html Linux and FreeBSD return a uniqu