summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 2005-05-14 Sergei Organov <osv@topconrd.ru>Joel Sherrill2005-05-201-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR 746/rtems Optimize realloc(). The problem is that realloc() can neither grow nor shrink efficiently the current memory region without support from underlying heap/region modules. The patch introduces one new routine for each of heap and region modules, _Heap_Resize_block(), and rtems_region_resize_segment(), respectively, and uses the latter to optimize realloc(). The implementation of _Heap_Resize_block() lead to changing of the heap allocation strategy: now the heap manager, when splits larger free block into used and new free parts, makes the first part of the block used, not the last one as it was before. Due to this new strategy, _Heap_Resize_block() never needs to change the user pointer. Caveat: unlike previous heap implementation, first few bytes of the contents of the memory allocated from the heap are now almost never all zero. This can trigger bugs in client code that have not been visible before this patch. * libcsupport/src/malloc.c (realloc): try to resize segment in place using new rtems_region_resize_segment() routine before falling back to the malloc()/free() method. * score/src/heap.c: (_Heap_Initialize): change initial heap layout to reflect new allocation strategy of using of the lower part of a previously free block when splitting it for the purpose of allocation. (_Heap_Block_allocate): when split, make the lower part used, and leave the upper part free. Return type changed from Heap_Block* to uint32_t. * score/include/rtems/score/heap.h: (Heap_Statistics): added 'resizes' field. (Heap_Resize_status): new enum. (_Heap_Resize_block): new routine. (_Heap_Block_allocate): return type changed from Heap_Block* to uint32_t. * score/src/heapwalk.c: reflect new heap layout in checks. * score/src/heapsizeofuserarea.c: more assertions added. * score/src/heapresizeblock.c: new file. (_Heap_Resize_block): new routine. * score/src/heapfree.c: reverse the checks _Heap_Is_block_in() and _Heap_Is_prev_used() on entry to be in this order. * score/src/heapallocate.c, score/src/heapallocatealigned.c: ignore return value of _Heap_Block_allocate(). * score/Makefile.am (HEAP_C_FILES): added src/heapresizeblock.c. * rtems/include/rtems/rtems/region.h: (rtems_region_resize_segment): new interface routine. (_Region_Process_queue): new internal routine called from rtems_region_resize_segment() and rtems_region_return_segment(). * rtems/src/regionreturnsegment.c: move queue management code into the new internal routine _Region_Process_queue() and call it. * rtems/src/regionresizesegment.c: new file. (rtems_region_resize_segment): new interface routine. * rtems/src/regionprocessqueue.c: new file. (_Region_Process_queue): new internal routine containing queue management code factored out from 'regionreturnsegment.c'. * rtems/Makefile.am (REGION_C_FILES): Added src/regionresizesegment.c, and src/regionprocessqueue.c. * ada/rtems.adb, ada/rtems.ads: Added Region_Resize_Segment.
* Partial update from FreeBSD.Ralf Corsepius2005-05-091-6/+5
|
* 2005-05-06 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2005-05-061-2/+2
| | | | * libcsupport/src/termios.c: Removed warnings.
* 2005-05-03 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2005-05-031-1/+1
| | | | | * libcsupport/include/ringbuf.h: Use uint8_t instead of char for raw data buffer.
* Auto-generated update.Ralf Corsepius2005-02-191-1/+1
|
* Cosmetics.Ralf Corsepius2005-02-081-2/+0
|
* Split preinstallation rules in to separate files (preinstall.am).Ralf Corsepius2005-02-081-134/+6
|
* New.Ralf Corsepius2005-02-081-0/+112
|
* 2005-02-04 Ralf Corsepius <ralf.corsepius@rtems.org>Ralf Corsepius2005-02-041-2/+2
| | | | | | | * libcsupport/include/rtems/libio.h: Use rtems_id for semaphores. Use char* for buffer. * backward/ftpd.h: New. * Makefile.am: Reflect having added backward/ftpd.h.
* 2005-02-01 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2005-02-022-9/+11
| | | | | | | | * libblock/include/rtems/bdbuf.h, libblock/include/rtems/ide_part_table.h, libblock/src/blkdev.c, libcsupport/include/rtems/termiostypes.h, libcsupport/src/termios.c, posix/macros/rtems/posix/cond.inl, posix/macros/rtems/posix/mutex.inl : Remove warnings.
* 2005-01-28 Ralf Corsepius <ralf.corsepius@rtems.org>Ralf Corsepius2005-01-281-4/+4
| | | | | * libcsupport/include/inttypes.h: New header guard. Fix doxygen preamble.
* New header guards.Ralf Corsepius2005-01-2819-38/+38
|
* 2005-01-28 Ralf Corsepius <ralf.corsepius@rtems.org>Ralf Corsepius2005-01-281-2/+0
| | | | | | | * itron/Makefile.am, libblock/Makefile.am, libcsupport/Makefile.am, libfs/Makefile.am, libmisc/Makefile.am, posix/Makefile.am, rtems/Makefile.am, sapi/Makefile.am: Remove AM_CPPFLAGS += -I$(top_builddir).
* 2005-01-27 Ralf Corsepius <ralf.corsepius@rtems.org>Ralf Corsepius2005-01-272-0/+8
| | | | | * libcsupport/src/lstat.c, libcsupport/src/readdir_r.c: Include config.h.
* 2005-01-27 Ralf Corsepius <ralf.corsepius@rtems.org>Ralf Corsepius2005-01-272-79/+47
| | | | | | | * libcsupport/include/tar.h: New (SUSv3). * Makefile.am: Integrate newlib-specific headers. Add libcsupport/include/tar.h. * libcsupport/Makefile.am: Remove newlib-specific headers.
* 2005-01-24 Ralf Corsepius <ralf.corsepius@rtems.org>Ralf Corsepius2005-01-241-0/+10
| | | | * libcsupport/include/stdint.h: Use __PTRDIFF_TYPE for intptr_t.
* 2005-01-18 Ralf Corsepius <ralf.corsepius@rtems.org>Ralf Corsepius2005-01-181-3/+3
| | | | * libcsupport/src/termios.c: Remove unnecessary type casts.
* Fix typos.Ralf Corsepius2005-01-141-2/+2
|
* 2005-01-13 Joel Sherrill <joel@oarcorp.com>Ralf Corsepius2005-01-131-1/+28
| | | | | | Ralf Corsepius <ralf.corsepius@rtems.org> * libcsupport/src/gxx_wrapper.c: Reflect GCC-4.0's gthr-rtems.h.
* 2005-01-07 Ralf Corsepius <ralf.corsepius@rtems.org>Ralf Corsepius2005-01-071-1/+1
| | | | | | | | * httpd/Makefile.am, itron/Makefile.am, libblock/Makefile.am, libcsupport/Makefile.am, libfs/Makefile.am, libmisc/Makefile.am, libnetworking/Makefile.am, librpc/Makefile.am, posix/Makefile.am, rtems/Makefile.am, sapi/Makefile.am, score/Makefile.am: Eliminate CFLAGS_OPTIMIZE_V.
* 2005-01-01 Ralf Corsepius <ralf.corsepius@rtems.org>Ralf Corsepius2005-01-011-10/+3
| | | | | | | | | * automake/compile.am, httpd/Makefile.am, itron/Makefile.am, libblock/Makefile.am, libcsupport/Makefile.am, libfs/Makefile.am, libmisc/Makefile.am, libnetworking/Makefile.am, librpc/Makefile.am, posix/Makefile.am, rtems/Makefile.am, sapi/Makefile.am, score/Makefile.am, wrapup/Makefile.am: Remove build-variant support.
* Remove (Obsolete).Ralf Corsepius2004-12-291-4/+0
|
* Add doxygen preamble.Ralf Corsepius2004-12-0221-27/+95
|
* 2004-11-29 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2004-11-291-2/+2
| | | | | | | | | | | | * libcsupport/src/mallocfreespace.c, rtems/Makefile.am, rtems/include/rtems/rtems/region.h, score/Makefile.am, score/include/rtems/score/heap.h, score/src/heapgetinfo.c: Add capability to return information about just the free blocks in a region or heap. Also changed the semantics of free space available to be the largest block of memory that can be allocated. * rtems/src/regiongetfreeinfo.c, score/src/heapgetfreeinfo.c: New files. : score/include/rtems/score/object.h, score/src/objectinitializeinformation.c: Remove warning.
* 2004-11-22 Joel Sherrill <joel@OARcorp.com>Jennifer Averett2004-11-221-1/+1
| | | | * libcsupport/src/ttyname_r.c: Remove warning for using _fstat.
* 2004-11-20 Ralf Corsepius <ralf.corsepiu@rtems.org>Ralf Corsepius2004-11-201-4/+3
| | | | * libcsupport/include/stdint.h: Move mal-placed comment.
* 2004-11-09 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2004-11-091-1/+1
| | | | * libcsupport/include/stdint.h: Fixed name in @file.
* 2004-11-08 Ralf Corsepius <ralf.corsepiu@rtems.org>Ralf Corsepius2004-11-091-12/+0
| | | | | | | | | | * libcsupport/include/sys/_stdint.h: Remove. * libcsupport/include/sys/_inttypes.h: Remove. * libcsupport/include/stdint.h: Replace with former sys/_stdint.h. Add INT<N>_C, various additions. * libcsupport/include/inttypes.h: Replace with former sys/_inttypes.h. * libcsupport/Makefile.am: Reflect changes above.
* 2004-11-08 Ralf Corsepius <ralf.corsepiu@rtems.org>Ralf Corsepius2004-11-091-10/+0
| | | | | | | | | | * libcsupport/include/sys/_stdint.h: Remove. * libcsupport/include/sys/_inttypes.h: Remove. * libcsupport/include/stdint.h: Replace with former sys/_stdint.h. Add INT<N>_C, various additions. * libcsupport/include/inttypes.h: Replace with former sys/_inttypes.h. * libcsupport/Makefile.am: Reflect changes above.
* 2004-11-08 Ralf Corsepius <ralf.corsepiu@rtems.org>Ralf Corsepius2004-11-082-12/+549
| | | | | | | | | | * libcsupport/include/sys/_stdint.h: Remove. * libcsupport/include/sys/_inttypes.h: Remove. * libcsupport/include/stdint.h: Replace with former sys/_stdint.h. Add INT<N>_C, various additions. * libcsupport/include/inttypes.h: Replace with former sys/_inttypes.h. * libcsupport/Makefile.am: Reflect changes above.
* Remove.Ralf Corsepius2004-11-082-516/+0
|
* 2004-11-07 Ralf Corsepius <ralf.corsepiu@rtems.org>Ralf Corsepius2004-11-071-1/+6
| | | | | | * libcsupport/include/sys/_stdint.h: Special-case int64_t (GCC has __LONG_LONG_MAX__, while POSIX mandates LLONG_MAX. This break __EXP(LONG_LONG_MAX)).
* 2004-11-05 Ralf Corsepius <ralf_corsepiu@rtems.org>Ralf Corsepius2004-11-052-21/+1
| | | | | | | * configure.ac: Remove RTEMS_USES_INTTYPES_H. Require inttypes.h. * include/rtems/stdint.h: Remove "wild guesses", require inttypes.h. * libcsupport/include/inttypes.h: Cleanup. * libcsupport/include/stdint.h: Cleanup.
* 2004-11-04 Ralf Corsepius <ralf_corsepiu@rtems.org>Ralf Corsepius2004-11-044-24/+149
| | | | | | | | | | | * include/sys/_stdint.h: Various changes. Add *leastN_t types. Add INTN_{MIN|MAX} macros. Add doxygen preamble. * include/sys/_inttypes.h: Add doxygen preamble. Reflect changes above. * libcsupport/include/stdint.h: Add doxygen preamble. * libcsupport/include/inttypes.h: Add doxygen preamble. * configure.ac: Add doxygen preamble to cpuopts.h.
* 2004-11-01 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius2004-11-012-17/+111
| | | | | | | * configure.ac: Remove -ansi (Cygwin breaks with it). * libcsupport/include/stdint.h: Use sys/_stdint.h to setup fixed size types. * libcsupport/include/sys/_inttypes.h: Add SCN*N macros.
* 2004-11-01 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius2004-11-011-1/+1
| | | | * libcsupport/src/utsname.c: Revert yesterdays patch.
* 2004-10-31 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2004-10-311-1/+1
| | | | * libcsupport/src/utsname.c: Fix typo.
* 2004-10-28 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius2004-10-292-2/+3
| | | | | | * libcsupport/include/inttypes.h: #include <sys/_inttypes.h> * libcsupport/src/utsname.c: Don't include sptables.h. Include <inttypes.h>. Use PRId32 instead of "%d".
* 2004-10-28 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius2004-10-295-184/+349
| | | | | | | | * libcsupport/include/rtems/_inttypes.h: Remove. * libcsupport/include/rtems/_stdint.h: Remove. * libcsupport/include/sys/_inttypes.h: New. * libcsupport/include/sys/_stdint.h: New. * libcsupport/Makefile.am: Reflect changes above.
* 2004-10-26 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius2004-10-262-3/+27
| | | | | | * libcsupport/include/rtems/_inttypes.h: Undefine __PRIN defines. * libcsupport/include/rtems/_stdint.h: Apply GNUC-limits to GCC >= 3.3, only. Add _rtems_*_t_defined defines. Add extern "C".
* 2004-10-26 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius2004-10-261-0/+10
| | | | | | * libcsupport/rtems/_stdint.h: New. * libcsupport/rtems/_inttypes.h: New. * libcsupport/Makefile.am: Reflect changes above.
* New.Ralf Corsepius2004-10-262-0/+142
|
* 2004-10-26 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius2004-10-261-15/+4
| | | | | * libcsupport/include/sys/ioctl.h: Cosmetical update from FreeBSD. Remove sys/compat_ioctl.h section (Meaningless with RTEMS).
* 2004-10-26 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius2004-10-261-5/+4
| | | | * libcsupport/include/sys/ioccom.h: Cosmetical update from FreeBSD.
* 2004-10-22 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius2004-10-221-0/+3
| | | | * libcsupport/include/stdint.h: Add intptr_t uintptr_t.
* Remove stray white spaces.Ralf Corsepius2004-04-1861-392/+392
|
* Remove stray white spaces.Ralf Corsepius2004-04-1530-36/+1
|
* 2004-04-14 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius2004-04-141-13/+4
| | | | | * libcsupport/Makefile.am: Install include_sys_HEADERS for NEWLIB only. Merge sys/cdefs.h into general include_sys_HEADERS.
* 2004-04-13 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius2004-04-133-40/+17
| | | | | | | | | | | | * configure.ac: Rework stdint.h/inttypes.h support. Add RTEMS_USES_STDINT_H. Add RTEMS_USES_INTTYPES_H. Remove NEED_STDINT_H. Remove NEED_INTTYPES_H. Remove termios-flag detection. * libcsupport/Makefile.am: Install include/stdint.h and include/inttypes.h for NEWLIB only. * libcsupport/include/stdint.h: Rework; Now newlib specific. * libcsupport/src/termios.c: Make newlib specific. * include/rtems/stdint.h: Rework; Now wrapper to <stdint.h>.
* 2004-04-09 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius2004-04-091-3/+3
| | | | | * libblock/Makefile.am: Build libblock for !UNIX only. * libcsupport/Makefile.am: Build $(TERMIOS_C_FILES) for !UNIX only.