diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-05-04 13:14:21 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-05-04 13:15:37 +0200 |
commit | f48aea09d8d82ab80568ad2edcd02b8a11bea886 (patch) | |
tree | d1a3ece048ae76fe47d3a05bea0163751596ec52 | |
parent | Update RTEMS 6 release notes (diff) | |
download | rtems-release-f48aea09d8d82ab80568ad2edcd02b8a11bea886.tar.bz2 |
Mention zero size allocation changes
-rw-r--r-- | rtems-notes-6.md | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/rtems-notes-6.md b/rtems-notes-6.md index cec71d0..39ebd29 100644 --- a/rtems-notes-6.md +++ b/rtems-notes-6.md @@ -39,7 +39,19 @@ Implementation improvements usually fall into one of the following categories: #### API Implementation Improvements -* TBD +* Zero size allocation results are now consistent accross directives, for + example `malloc( 0 )` and `posix_memalign( &p, align, 0 )` return now a + unique pointer (or `NULL` if the heap is empty). 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. + This approach is now also used in RTEMS as well throughout the memory + allocation directives #### API Deprecations |