Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Return NULL for zero size allocations | Sebastian Huber | 2021-05-06 | 1 | -4/+5 |
| | | | | | | | | | | | | | | | 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. | ||||
* | Fix calloc() behaviour in case of overflow | Sebastian Huber | 2021-04-20 | 1 | -1/+8 |
| | | | | | | | The multiplication to calculate the length of the memory area to allocate may overflow. Return NULL in case of an overflow. Close #4389. | ||||
* | libcsupport: Move rtems_calloc() | Sebastian Huber | 2021-04-20 | 1 | -0/+57 |
Move rtems_calloc() since it only depends on rtems_malloc(). This may make it easier to customize the heap allocator. Change licence to BSD-2-Clause according to file history. Update #3053. |