summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport (unfollow)
Commit message (Collapse)AuthorFilesLines
2005-05-202005-05-14 Sergei Organov <osv@topconrd.ru>Joel Sherrill1-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.
2005-05-09Partial update from FreeBSD.Ralf Corsepius1-6/+5
2005-05-062005-05-06 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-2/+2
* libcsupport/src/termios.c: Removed warnings.
2005-05-032005-05-03 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-1/+1
* libcsupport/include/ringbuf.h: Use uint8_t instead of char for raw data buffer.
2005-02-19Auto-generated update.Ralf Corsepius1-1/+1
2005-02-08Cosmetics.Ralf Corsepius1-2/+0
2005-02-08Split preinstallation rules in to separate files (preinstall.am).Ralf Corsepius1-134/+6
2005-02-08New.Ralf Corsepius1-0/+112
2005-02-042005-02-04 Ralf Corsepius <ralf.corsepius@rtems.org>Ralf Corsepius1-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-022005-02-01 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2-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-282005-01-28 Ralf Corsepius <ralf.corsepius@rtems.org>Ralf Corsepius1-4/+4
* libcsupport/include/inttypes.h: New header guard. Fix doxygen preamble.
2005-01-28New header guards.Ralf Corsepius19-38/+38
2005-01-282005-01-28 Ralf Corsepius <ralf.corsepius@rtems.org>Ralf Corsepius1-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-272005-01-27 Ralf Corsepius <ralf.corsepius@rtems.org>Ralf Corsepius2-0/+8
* libcsupport/src/lstat.c, libcsupport/src/readdir_r.c: Include config.h.
2005-01-272005-01-27 Ralf Corsepius <ralf.corsepius@rtems.org>Ralf Corsepius2-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-242005-01-24 Ralf Corsepius <ralf.corsepius@rtems.org>Ralf Corsepius1-0/+10
* libcsupport/include/stdint.h: Use __PTRDIFF_TYPE for intptr_t.
2005-01-182005-01-18 Ralf Corsepius <ralf.corsepius@rtems.org>Ralf Corsepius1-3/+3
* libcsupport/src/termios.c: Remove unnecessary type casts.
2005-01-14Fix typos.Ralf Corsepius1-2/+2
2005-01-132005-01-13 Joel Sherrill <joel@oarcorp.com>Ralf Corsepius1-1/+28
Ralf Corsepius <ralf.corsepius@rtems.org> * libcsupport/src/gxx_wrapper.c: Reflect GCC-4.0's gthr-rtems.h.
2005-01-072005-01-07 Ralf Corsepius <ralf.corsepius@rtems.org>Ralf Corsepius1-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-012005-01-01 Ralf Corsepius <ralf.corsepius@rtems.org>Ralf Corsepius1-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.
2004-12-29Remove (Obsolete).Ralf Corsepius1-4/+0
2004-12-02Add doxygen preamble.Ralf Corsepius21-27/+95
2004-11-292004-11-29 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-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-222004-11-22 Joel Sherrill <joel@OARcorp.com>Jennifer Averett1-1/+1
* libcsupport/src/ttyname_r.c: Remove warning for using _fstat.
2004-11-202004-11-20 Ralf Corsepius <ralf.corsepiu@rtems.org>Ralf Corsepius1-4/+3
* libcsupport/include/stdint.h: Move mal-placed comment.
2004-11-092004-11-09 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-1/+1
* libcsupport/include/stdint.h: Fixed name in @file.
2004-11-092004-11-08 Ralf Corsepius <ralf.corsepiu@rtems.org>Ralf Corsepius1-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-092004-11-08 Ralf Corsepius <ralf.corsepiu@rtems.org>Ralf Corsepius1-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-082004-11-08 Ralf Corsepius <ralf.corsepiu@rtems.org>Ralf Corsepius2-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.
2004-11-08Remove.Ralf Corsepius2-516/+0
2004-11-072004-11-07 Ralf Corsepius <ralf.corsepiu@rtems.org>Ralf Corsepius1-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-052004-11-05 Ralf Corsepius <ralf_corsepiu@rtems.org>Ralf Corsepius2-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-042004-11-04 Ralf Corsepius <ralf_corsepiu@rtems.org>Ralf Corsepius4-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-012004-11-01 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius2-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-012004-11-01 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius1-1/+1
* libcsupport/src/utsname.c: Revert yesterdays patch.
2004-10-312004-10-31 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-1/+1
* libcsupport/src/utsname.c: Fix typo.
2004-10-292004-10-28 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius2-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-292004-10-28 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius5-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-262004-10-26 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius2-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-262004-10-26 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius1-0/+10
* libcsupport/rtems/_stdint.h: New. * libcsupport/rtems/_inttypes.h: New. * libcsupport/Makefile.am: Reflect changes above.
2004-10-26New.Ralf Corsepius2-0/+142
2004-10-262004-10-26 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius1-15/+4
* libcsupport/include/sys/ioctl.h: Cosmetical update from FreeBSD. Remove sys/compat_ioctl.h section (Meaningless with RTEMS).
2004-10-262004-10-26 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius1-5/+4
* libcsupport/include/sys/ioccom.h: Cosmetical update from FreeBSD.
2004-10-222004-10-22 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius1-0/+3
* libcsupport/include/stdint.h: Add intptr_t uintptr_t.
2004-04-18Remove stray white spaces.Ralf Corsepius61-392/+392
2004-04-15Remove stray white spaces.Ralf Corsepius30-36/+1
2004-04-142004-04-14 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius1-13/+4
* libcsupport/Makefile.am: Install include_sys_HEADERS for NEWLIB only. Merge sys/cdefs.h into general include_sys_HEADERS.
2004-04-132004-04-13 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius3-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-092004-04-09 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius1-3/+3
* libblock/Makefile.am: Build libblock for !UNIX only. * libcsupport/Makefile.am: Build $(TERMIOS_C_FILES) for !UNIX only.