summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/free.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* cpukit/libcsupport/src/[a-f]*: Change license to BSD-2Joel Sherrill2022-04-011-3/+22
| | | | Updates #3053.
* malloc: Make deferred free support optionalSebastian Huber2020-07-241-0/+43
| | | | | | | | | | | | | | | | | | | | Only include the deferred free support if free() is actually used by the application. The free() implementation in RTEMS supports that allocated memory is freed in interrupt context. Since the heap is protected by a mutex, the frees issued in interrupt context cannot immediately be freed to the heap, instead they are placed on a deferred free list. This list is emptied by the core allocation function rtems_heap_allocate_aligned_with_boundary(). This adds a dependency to free() in rtems_heap_allocate_aligned_with_boundary(). In order to better support applications which only allocate memory and never free it, this dependency should be avoided. Provide a weak default implementation of _Malloc_Process_deferred_frees() for rtems_heap_allocate_aligned_with_boundary(). In the free() module provide the strong implementation. Close #4032.
* doxygen: Switch @brief and @ingroupSebastian Huber2020-04-281-1/+2
| | | | This order change fixes the Latex documentation build via Doxygen.
* 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
* Add RTEMS_FATAL_SOURCE_INVALID_HEAP_FREESebastian Huber2018-06-051-6/+1
| | | | | | | | An invalid heap usage such as a double free is usually a fatal error since this indicates a use after free. Replace the use of printk() in free() with a fatal error. Update #3437.
* libcsupport: Fix printk warnings.Chris Johns2016-05-251-2/+2
|
* malloc: Add _Malloc_System_state()Sebastian Huber2016-02-251-6/+2
| | | | | | | | | | Replace malloc_is_system_state_OK() with _Malloc_System_state() to allow early allocations, e.g. in bsp_start(). Here the _Thread_Executing is NULL, thus an _API_Mutex_Lock() would lead to a NULL pointer access. Move malloc() support code to general case rtems_heap_allocate_aligned_with_boundary(). Use rtems_heap_allocate_aligned_with_boundary() to avoid duplicated code.
* libcsupport: Delete malloc statisticsSebastian Huber2014-11-281-8/+2
| | | | | | | Use the heap handler statistics instead. Add heap walk option to MALLOC shell command. close #1367
* libcsupport: malloc_is_system_state_OK()Sebastian Huber2014-11-251-2/+1
| | | | Move system state check to malloc_is_system_state_OK().
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-211-1/+1
|
* score: Merge sysstate API into one fileSebastian Huber2013-07-241-0/+2
|
* libcsupport: Doxygen Enhancement Task #3Mathew Kallada2012-12-081-2/+7
| | | | http://www.google-melange.com/gci/task/view/google/gci2012/7992210
* 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.
* 2010-08-25 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-08-251-4/+0
| | | | | | * libcsupport/src/free.c, libcsupport/src/malloc.c, libcsupport/src/malloc_initialize.c: Remove heap walks in case RTEMS_DEBUG is defined.
* 2010-06-30 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill2010-06-301-9/+0
| | | | | | | | | | 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.
* Whitespace removal.Ralf Corsepius2009-11-291-1/+1
|
* 2009-09-06 Sebastian Huber <Sebastian.Huber@embedded-brains.de>Joel Sherrill2009-09-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * libcsupport/src/free.c, libmisc/stackchk/check.c, rtems/include/rtems/rtems/region.h, rtems/src/regioncreate.c, rtems/src/regionextend.c, rtems/src/regiongetinfo.c, rtems/src/regiongetsegment.c, rtems/src/regiongetsegmentsize.c, rtems/src/regionresizesegment.c, score/src/pheapallocate.c, score/src/pheapallocatealigned.c, score/src/pheapextend.c, score/src/pheapfree.c, score/src/pheapgetblocksize.c, score/src/pheapgetfreeinfo.c, score/src/pheapgetinfo.c, score/src/pheapgetsize.c, score/src/pheapinit.c, score/src/pheapresizeblock.c, score/src/pheapwalk.c: Update for heap API changes. * score/include/rtems/score/apimutex.h, score/include/rtems/score/object.h: Documentation. * score/include/rtems/score/heap.h, score/include/rtems/score/protectedheap.h, score/inline/rtems/score/heap.inl, score/src/heap.c, score/src/heapallocate.c, score/src/heapallocatealigned.c, score/src/heapextend.c, score/src/heapfree.c, score/src/heapgetfreeinfo.c, score/src/heapgetinfo.c, score/src/heapresizeblock.c, score/src/heapsizeofuserarea.c, score/src/heapwalk.c: Overall cleanup. Added boundary constraint to allocation function. More changes follow.
* 2008-10-14 Tim Cussins <timcussins@eml.cc>Joel Sherrill2008-10-141-1/+1
| | | | * libcsupport/src/free.c: Should print begin field not start field.
* 2008-09-17 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2008-09-171-4/+4
| | | | | | | | | | | | | * 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.
* Convert using "bool".Ralf Corsepius2008-09-011-1/+1
|
* 2008-01-09 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2008-01-091-1/+1
| | | | | | | | | | | | * libcsupport/Makefile.am, libcsupport/include/rtems/malloc.h, libcsupport/src/free.c, libcsupport/src/malloc.c, libcsupport/src/malloc_deferred.c, libcsupport/src/malloc_initialize.c, libcsupport/src/malloc_p.h, libcsupport/src/malloc_sbrk_helpers.c, libcsupport/src/posix_memalign.c: Place all deferred free code and place it in subroutines. Add plugin for dirtying allocated memory to assist in debugging. Clean up comments and spacing as needed. * libcsupport/src/malloc_dirtier.c: New file.
* 2007-12-19 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill2007-12-191-4/+3
| | | | | | | | | | | * libcsupport/Makefile.am, libcsupport/include/rtems/malloc.h, libcsupport/src/free.c, libcsupport/src/malloc.c, libcsupport/src/malloc_p.h, libcsupport/src/malloc_report_statistics_plugin.c, libmisc/shell/shell.c, libmisc/shell/shell.h, score/src/objectinitializeinformation.c: Add posix_memalign. Split out management of deferred frees to subroutines. * libcsupport/src/malloc_deferred.c, libcsupport/src/posix_memalign.c: New files.
* 2007-12-18 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2007-12-181-0/+69
* 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.