Timestamp:
05/05/21 06:49:52 (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
b391affc
Parents:
5580b93
git-author:
Sebastian Huber <sebastian.huber@…> (05/05/21 06:49:52)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/06/21 06:03:58)
Message:

Return NULL for zero size allocations

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 unique pointer for zero size memory
allocations. Return NULL on RTEMS to more likely catch the use of a
zero size memory area by erroneous applications.

Update #4390.

(No files)

Note: See TracChangeset for help on using the changeset viewer.