On Wed, Sep 18, 2019, 9:44 AM Hans Petter Selasky wrote:
> On 2019-09-18 10:37, Warner Losh wrote:
> > On Wed, Sep 18, 2019, 12:18 AM Conrad Meyer wrote:
> >
> >> Well, hang on; it's also perfectly legal for a malloc implementation
> >> to return NULL for requests of zero bytes. You can access
On 2019-09-18 10:37, Warner Losh wrote:
On Wed, Sep 18, 2019, 12:18 AM Conrad Meyer wrote:
Well, hang on; it's also perfectly legal for a malloc implementation
to return NULL for requests of zero bytes. You can access exactly the
number of bytes requested in the allocation; and free(NULL) wor
On Wed, Sep 18, 2019, 12:18 AM Conrad Meyer wrote:
> Well, hang on; it's also perfectly legal for a malloc implementation
> to return NULL for requests of zero bytes. You can access exactly the
> number of bytes requested in the allocation; and free(NULL) works as
> expected. NULL (0) is also a
Well, hang on; it's also perfectly legal for a malloc implementation
to return NULL for requests of zero bytes. You can access exactly the
number of bytes requested in the allocation; and free(NULL) works as
expected. NULL (0) is also aligned to any size you could want.
Best,
Conrad
On Tue, Sep
On Tue, Sep 17, 2019 at 04:16:47PM +, Toomas Soome wrote:
> Author: tsoome
> Date: Tue Sep 17 16:16:46 2019
> New Revision: 352451
> URL: https://svnweb.freebsd.org/changeset/base/352451
>
> Log:
> loader: revert r352421
>
> As insisted by kib, malloc(0) is quite legal.
Thank you.
>
>
On Tue, 2019-09-17 at 16:16 +, Toomas Soome wrote:
> Author: tsoome
> Date: Tue Sep 17 16:16:46 2019
> New Revision: 352451
> URL: https://svnweb.freebsd.org/changeset/base/352451
>
> Log:
> loader: revert r352421
>
> As insisted by kib, malloc(0) is quite legal.
>
> Modified:
> head
Author: tsoome
Date: Tue Sep 17 16:16:46 2019
New Revision: 352451
URL: https://svnweb.freebsd.org/changeset/base/352451
Log:
loader: revert r352421
As insisted by kib, malloc(0) is quite legal.
Modified:
head/stand/libsa/zalloc_malloc.c
Modified: head/stand/libsa/zalloc_malloc.c
==