summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/realloc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Make zero size allocation result consistentSebastian Huber2021-05-041-4/+4
| | | | | | | | | | | | | | | | | | The zero size allocations had no consistent behaviour in RTEMS. For example, malloc( 0 ) returned NULL and posix_memalign( &p, align, 0 ) returned in p a unique pointer (or NULL if no memory is available). 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. Use this approach for RTEMS as well throughout the memory allocation directives Close #4390.
* 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
* malloc: Fix early realloc() allocationSebastian Huber2016-04-061-45/+48
|
* libcsupport: Delete malloc statisticsSebastian Huber2014-11-281-4/+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
|
* score: Create object implementation headerSebastian Huber2013-07-261-0/+1
| | | | | | Move implementation specific parts of object.h and object.inl into new header file objectimpl.h. The object.h contains now only the application visible API.
* score: Merge sysstate API into one fileSebastian Huber2013-07-241-0/+2
|
* Include missing <string.h>Sebastian Huber2013-07-231-0/+1
|
* libcsupport: Do not use _ISR_Nest_levelSebastian Huber2013-07-181-3/+0
| | | | | The _Thread_Dispatch_is_enabled() is false if _ISR_Nest_level is not equal to zero.
* score: Add and use _Thread_Dispatch_is_enabled()Sebastian Huber2013-06-141-1/+1
| | | | | Delete _Thread_Dispatch_in_critical_section() and _Thread_Is_dispatching_enabled().
* libcsupport: Doxygen enhancement GCI task #6Alex Ivanov2012-12-111-2/+7
| | | | http://www.google-melange.com/gci/task/view/google/gci2012/7992212
* 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.
* 2011-04-21 Jennifer Averett <Jennifer.Averett@OARcorp.comJennifer Averett2011-04-211-1/+1
| | | | | | | | | | | | | PR 1777/cpukit * libcsupport/src/malloc_deferred.c, libcsupport/src/realloc.c, score/Makefile.am, score/cpu/lm32/irq.c, score/cpu/nios2/irq.c, score/include/rtems/score/coremutex.h, score/include/rtems/score/thread.h, score/inline/rtems/score/thread.inl, score/src/heapfree.c, score/src/pheapwalk.c, score/src/smp.c, score/src/threaddispatch.c: Consolidated access to _Thread_Dispatch_disable_level. * score/src/threaddisabledispatch.c, score/src/threadenabledispatch.c: New files.
* 2010-06-30 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill2010-06-301-17/+2
| | | | | | | | | | PR 1472/cpukit * libcsupport/Makefile.am, libcsupport/include/rtems/malloc.h, libcsupport/src/free.c, libcsupport/src/malloc.c, libcsupport/src/malloc_initialize.c, libcsupport/src/realloc.c, libcsupport/src/rtems_memalign.c: Remove malloc boundary code. It has not been used since before 4.6 and is bitrotted. * libcsupport/src/malloc_boundary.c: Removed.
* 2009-09-14 Sebastian Huber <Sebastian.Huber@embedded-brains.de>Joel Sherrill2009-09-141-3/+3
| | | | | | | | | | | | | | | | | | * 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.
* 2008-12-14 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2008-12-141-2/+2
| | | | | | | | | | | | | | | | * libcsupport/src/realloc.c, rtems/include/rtems/rtems/region.h, rtems/src/regioncreate.c, rtems/src/regionextend.c, rtems/src/regiongetsegment.c, rtems/src/regiongetsegmentsize.c, rtems/src/regionmp.c, rtems/src/regionresizesegment.c, sapi/include/rtems/config.h, score/include/rtems/score/heap.h, score/include/rtems/score/protectedheap.h, score/src/heap.c, score/src/heapallocate.c, score/src/heapallocatealigned.c, score/src/heapextend.c, score/src/heapresizeblock.c, score/src/heapsizeofuserarea.c, score/src/pheapallocate.c, score/src/pheapallocatealigned.c, score/src/pheapextend.c, score/src/pheapgetblocksize.c, score/src/pheapresizeblock.c: Change sizes of heap/region and allocated objects in heap to intptr_t so they can be larger than a single allocatable object (e.g. size_t).
* 2008-10-02 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2008-10-021-3/+3
| | | | | | | | | | | | | | | | | * libcsupport/src/malloc_statistics_helpers.c, libcsupport/src/realloc.c, rtems/include/rtems/rtems/region.h, rtems/include/rtems/rtems/support.h, rtems/src/regiongetsegmentsize.c, rtems/src/regionresizesegment.c, rtems/src/workspace.c, sapi/include/confdefs.h, score/include/rtems/score/heap.h, score/include/rtems/score/protectedheap.h, score/include/rtems/score/wkspace.h, score/src/heap.c, score/src/heapallocate.c, score/src/heapallocatealigned.c, score/src/heapextend.c, score/src/heapresizeblock.c, score/src/heapsizeofuserarea.c, score/src/pheapgetblocksize.c, score/src/wkspace.c: Change size_t to ssize_t on all Heap, Workspace and Region calls. On 16-bit architectures, size_t can be 16-bits which would limit sizes to 64K.
* 2008-09-17 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2008-09-171-2/+2
| | | | | | | | | | | | | * libcsupport/src/free.c, libcsupport/src/malloc.c, libcsupport/src/malloc_initialize.c, libcsupport/src/malloc_p.h, libcsupport/src/malloc_sbrk_helpers.c, libcsupport/src/malloc_statistics_helpers.c, libcsupport/src/malloc_walk.c, libcsupport/src/mallocfreespace.c, libcsupport/src/mallocinfo.c, libcsupport/src/realloc.c, libcsupport/src/rtems_memalign.c, sapi/include/confdefs.h, score/inline/rtems/score/thread.inl: Add support for optionally having a unified work area. In other words, the RTEMS Workspace and C Program Heap are the same pool of memory.
* 2008-01-29 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill2008-01-291-5/+5
| | | | | | | | | | | * libcsupport/Makefile.am, libcsupport/include/rtems/malloc.h, libcsupport/src/malloc_walk.c, libcsupport/src/posix_memalign.c, libcsupport/src/realloc.c, score/src/heapwalk.c: Add rtems_memalign as helper and as exposed nmemalign variant with few restrictions. Also turn on compilation of _Heap_Walk but make forced calls to it conditionally compiled. This should allow more flexibility to the user as to run-time checking of the heap. * libcsupport/src/rtems_memalign.c: New file.
* 2007-12-18 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2007-12-181-0/+103
* 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.