summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/rtemscalloc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Update company nameSebastian Huber2023-05-201-1/+1
| | | | | The embedded brains GmbH & Co. KG is the legal successor of embedded brains GmbH.
* Return NULL for zero size allocationsSebastian Huber2021-05-061-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 overflowSebastian Huber2021-04-201-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 Huber2021-04-201-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.