summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/calloc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* cpukit/libcsupport/src/[a-f]*: Change license to BSD-2Joel Sherrill2022-04-011-3/+22
| | | | Updates #3053.
* 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/+12
| | | | | | | The multiplication to calculate the length of the memory area to allocate may overflow. Return NULL in case of an overflow. Close #4389.
* Canonicalize config.h includeSebastian Huber2020-04-161-1/+1
| | | | | | | | Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
* Optimize calloc()Sebastian Huber2018-10-041-4/+5
| | | | Use return value of memset() to enable tail call optimizations.
* Avoid need for -fno-builtin for calloc()Sebastian Huber2018-10-041-0/+2
| | | | Use RTEMS_OBFUSCATE_VARIABLE() instead.
* libcsupport: Delete malloc statisticsSebastian Huber2014-11-281-5/+0
| | | | | | | Use the heap handler statistics instead. Add heap walk option to MALLOC shell command. close #1367
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-211-1/+1
|
* calloc.c: Remove use of register keywordJoel Sherrill2014-02-031-3/+3
|
* Include missing <string.h>Sebastian Huber2013-07-231-0/+1
|
* libcsupport: GCI Doxygen Task #7Alex Ivanov2012-12-111-2/+7
| | | | http://www.google-melange.com/gci/task/view/google/gci2012/7975223
* Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill2012-05-111-2/+0
| | | | | | | | | | | | Script does what is expected and tries to do it as smartly as possible. + remove occurrences of two blank comment lines next to each other after Id string line removed. + remove entire comment blocks which only exited to contain CVS Ids + If the processing left a blank line at the top of a file, it was removed.
* Rework autoconf defines.Ralf Corsepius2009-09-301-1/+1
|
* 2009-09-14 Sebastian Huber <Sebastian.Huber@embedded-brains.de>Joel Sherrill2009-09-141-2/+2
| | | | | | | | | | | | | | | | | | * score/src/wkspace.c: Removed work space area consistency checks. * libblock/include/rtems/ide_part_table.h: Functions are now deprecated. * libcsupport/include/rtems/libcsupport.h, libcsupport/src/calloc.c, libcsupport/src/malloc_boundary.c, libcsupport/src/malloc_initialize.c, libcsupport/src/malloc_report_statistics_plugin.c, libcsupport/src/malloc_statistics_helpers.c, libcsupport/src/malloc_walk.c, libcsupport/src/realloc.c, rtems/inline/rtems/rtems/region.inl: Update for heap API changes. 2009-09-14 Christian Mauderer <christian.mauderer@embedded-brains.de> * libcsupport/src/vprintk.c: Fixed warnings. Print nothing in case the pointer to the string is NULL.
* 2007-12-18 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2007-12-181-0/+41
* libcsupport/Makefile.am, libcsupport/preinstall.am, libcsupport/src/malloc.c, libcsupport/src/mallocinfo.c, libmisc/Makefile.am, libmisc/shell/main_mallocinfo.c, libmisc/shell/shellconfig.h: Split malloc.c into multiple files with one function per file. Also split out statistics into a separate file which can be plugged in dynamically. Right now, it is always in. I suspect that splitting the file removed more code than leaving statistics in. I tinkered with malloc information command in the shell. I resurrected the malloc arena code as malloc boundary. This code is now compiled all the time even though it does not appear to work. * libcsupport/include/rtems/malloc.h, libcsupport/src/_calloc_r.c, libcsupport/src/_free_r.c, libcsupport/src/_malloc_r.c, libcsupport/src/_realloc_r.c, libcsupport/src/calloc.c, libcsupport/src/free.c, libcsupport/src/malloc_boundary.c, libcsupport/src/malloc_get_statistics.c, libcsupport/src/malloc_initialize.c, libcsupport/src/malloc_p.h, libcsupport/src/malloc_report_statistics.c, libcsupport/src/malloc_report_statistics_plugin.c, libcsupport/src/malloc_statistics_helpers.c, libcsupport/src/malloc_walk.c, libcsupport/src/realloc.c, libmisc/shell/main_perioduse.c: New files.