summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/rtems_memalign.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-04-01cpukit/libcsupport/src/[g-r]*: Change license to BSD-2Joel Sherrill1-3/+22
Updates #3053.
2021-05-06Return NULL for zero size allocationsSebastian Huber1-0/+4
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.
2020-04-16Canonicalize config.h includeSebastian Huber1-1/+1
Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
2016-02-25malloc: Add _Malloc_System_state()Sebastian Huber1-16/+1
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.
2014-11-28libcsupport: Delete malloc statisticsSebastian Huber1-6/+0
Use the heap handler statistics instead. Add heap walk option to MALLOC shell command. close #1367
2014-11-25libcsupport: malloc_is_system_state_OK()Sebastian Huber1-4/+1
Move system state check to malloc_is_system_state_OK().
2014-03-21Change all references of rtems.com to rtems.org.Chris Johns1-1/+1
2013-07-24score: Merge sysstate API into one fileSebastian Huber1-0/+2
2012-12-13libcsupport: Doxygen enhancement task #9Alex Ivanov1-2/+7
2012-05-11Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill1-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-07-012010-07-01 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-8/+0
* libcsupport/src/rtems_memalign.c, score/include/rtems/score/heap.h: Remove stray references to malloc boundary.
2010-06-302010-06-30 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill1-11/+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.
2009-11-29Whitespace removal.Ralf Corsepius1-2/+2
2008-09-172008-09-17 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-1/+1
* 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-292008-01-29 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill1-14/+3
* 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.
2008-01-092008-01-09 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-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-192007-12-19 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill1-0/+102
* 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.