| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
* libcsupport/src/termios.c: Removed warnings.
|
|
|
|
|
| |
* libcsupport/include/ringbuf.h: Use uint8_t instead of char for raw
data buffer.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* libcsupport/include/inttypes.h: New header guard.
Fix doxygen preamble.
|
| |
|
|
|
|
|
|
|
| |
* 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).
|
|
|
|
|
| |
* libcsupport/src/lstat.c, libcsupport/src/readdir_r.c:
Include config.h.
|
|
|
|
|
|
|
| |
* libcsupport/include/tar.h: New (SUSv3).
* Makefile.am: Integrate newlib-specific headers.
Add libcsupport/include/tar.h.
* libcsupport/Makefile.am: Remove newlib-specific headers.
|
|
|
|
| |
* libcsupport/include/stdint.h: Use __PTRDIFF_TYPE for intptr_t.
|
|
|
|
| |
* libcsupport/src/termios.c: Remove unnecessary type casts.
|
| |
|
|
|
|
|
|
| |
Ralf Corsepius <ralf.corsepius@rtems.org>
* libcsupport/src/gxx_wrapper.c: Reflect GCC-4.0's gthr-rtems.h.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* libcsupport/src/ttyname_r.c: Remove warning for using _fstat.
|
|
|
|
| |
* libcsupport/include/stdint.h: Move mal-placed comment.
|
|
|
|
| |
* libcsupport/include/stdint.h: Fixed name in @file.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
| |
* 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)).
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* libcsupport/src/utsname.c: Revert yesterdays patch.
|
|
|
|
| |
* libcsupport/src/utsname.c: Fix typo.
|
|
|
|
|
|
| |
* 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".
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* 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".
|
|
|
|
|
|
| |
* libcsupport/rtems/_stdint.h: New.
* libcsupport/rtems/_inttypes.h: New.
* libcsupport/Makefile.am: Reflect changes above.
|
| |
|
|
|
|
|
| |
* libcsupport/include/sys/ioctl.h: Cosmetical update from FreeBSD.
Remove sys/compat_ioctl.h section (Meaningless with RTEMS).
|
|
|
|
| |
* libcsupport/include/sys/ioccom.h: Cosmetical update from FreeBSD.
|
|
|
|
| |
* libcsupport/include/stdint.h: Add intptr_t uintptr_t.
|
| |
|
| |
|
|
|
|
|
| |
* libcsupport/Makefile.am: Install include_sys_HEADERS for NEWLIB
only. Merge sys/cdefs.h into general include_sys_HEADERS.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>.
|
|
|
|
|
| |
* libblock/Makefile.am: Build libblock for !UNIX only.
* libcsupport/Makefile.am: Build $(TERMIOS_C_FILES) for !UNIX only.
|