Changeset 7ff6115 in rtems


Ignore:
Timestamp:
Nov 20, 2008, 8:01:13 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 5, master
Children:
db03bcc1
Parents:
bd59b348
Message:

2008-11-20 Joel Sherrill <joel.sherrill@…>

  • score/include/rtems/score/heap.h, score/include/rtems/score/protectedheap.h, score/include/rtems/score/wkspace.h, score/src/heap.c, score/src/heapallocate.c, score/src/heapallocatealigned.c, score/src/heapextend.c, score/src/heapresizeblock.c, score/src/heapsizeofuserarea.c, score/src/pheapgetblocksize.c, score/src/wkspace.c: Revert use of ssize_t. This type is not guaranteed to be able to represent a positive number greater than the size of a single allocatable object. We needed a type that is able to represent the size of a pool of multiple allocatable objects or potentially nearly all memory.
Location:
cpukit
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rbd59b348 r7ff6115  
     12008-11-20      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * score/include/rtems/score/heap.h,
     4        score/include/rtems/score/protectedheap.h,
     5        score/include/rtems/score/wkspace.h, score/src/heap.c,
     6        score/src/heapallocate.c, score/src/heapallocatealigned.c,
     7        score/src/heapextend.c, score/src/heapresizeblock.c,
     8        score/src/heapsizeofuserarea.c, score/src/pheapgetblocksize.c,
     9        score/src/wkspace.c: Revert use of ssize_t. This type is not
     10        guaranteed to be able to represent a positive number greater than the
     11        size of a single allocatable object. We needed a type that is able to
     12        represent the size of a pool of multiple allocatable objects or
     13        potentially nearly all memory.
     14
    1152008-11-20      Joel Sherrill <joel.sherrill@oarcorp.com>
    216
  • cpukit/score/include/rtems/score/heap.h

    rbd59b348 r7ff6115  
    3131#ifndef _RTEMS_SCORE_HEAP_H
    3232#define _RTEMS_SCORE_HEAP_H
    33 
    34 #include <sys/types.h>
    3533
    3634/**
     
    265263  Heap_Control *the_heap,
    266264  void         *starting_address,
    267   ssize_t       size,
     265  size_t        size,
    268266  uint32_t      page_size
    269267);
     
    284282  Heap_Control *the_heap,
    285283  void         *starting_address,
    286   ssize_t       size,
     284  size_t        size,
    287285  uint32_t     *amount_extended
    288286);
     
    299297void *_Heap_Allocate(
    300298  Heap_Control *the_heap,
    301   ssize_t       size
     299  size_t        size
    302300);
    303301
     
    318316void *_Heap_Allocate_aligned(
    319317  Heap_Control *the_heap,
    320   ssize_t       size,
     318  size_t        size,
    321319  uint32_t      alignment
    322320);
     
    339337  Heap_Control        *the_heap,
    340338  void                *starting_address,
    341   ssize_t             *size
     339  size_t              *size
    342340);
    343341
     
    367365  Heap_Control *the_heap,
    368366  void         *starting_address,
    369   ssize_t       size,
     367  size_t        size,
    370368  uint32_t     *old_mem_size,
    371369  uint32_t     *avail_mem_size
     
    452450 *  @return This method returns block size on success, 0 if overflow occured.
    453451 */
    454 extern ssize_t _Heap_Calc_block_size(
    455   ssize_t  size,
     452extern size_t _Heap_Calc_block_size(
     453  size_t   size,
    456454  uint32_t page_size,
    457455  uint32_t min_size
  • cpukit/score/include/rtems/score/protectedheap.h

    rbd59b348 r7ff6115  
    5555  Heap_Control *the_heap,
    5656  void         *starting_address,
    57   ssize_t       size,
     57  size_t        size,
    5858  uint32_t      page_size
    5959)
     
    129129  Heap_Control        *the_heap,
    130130  void                *starting_address,
    131   ssize_t             *size
     131  size_t              *size
    132132);
    133133
  • cpukit/score/include/rtems/score/wkspace.h

    rbd59b348 r7ff6115  
    5353void _Workspace_Handler_initialization(
    5454  void       *starting_address,
    55   ssize_t     size
     55  size_t      size
    5656);
    5757
     
    6767 */
    6868void *_Workspace_Allocate(
    69   ssize_t   size
     69  size_t   size
    7070);
    7171
     
    9595 */
    9696void *_Workspace_Allocate_or_fatal_error(
    97   ssize_t  size
     97  size_t  size
    9898);
    9999
  • cpukit/score/src/heap.c

    rbd59b348 r7ff6115  
    112112 *
    113113 */
     114
    114115uint32_t   _Heap_Initialize(
    115116  Heap_Control        *the_heap,
    116117  void                *starting_address,
    117   ssize_t              size,
     118  size_t               size,
    118119  uint32_t             page_size
    119120)
     
    207208 * Return block size on success, 0 if overflow occured
    208209 */
    209 ssize_t _Heap_Calc_block_size(
    210   ssize_t   size,
    211   uint32_t  page_size,
    212   uint32_t  min_size)
     210size_t _Heap_Calc_block_size(
     211  size_t   size,
     212  uint32_t page_size,
     213  uint32_t min_size)
    213214{
    214215  uint32_t block_size = size + HEAP_BLOCK_USED_OVERHEAD;
  • cpukit/score/src/heapallocate.c

    rbd59b348 r7ff6115  
    3737void *_Heap_Allocate(
    3838  Heap_Control        *the_heap,
    39   ssize_t              size
     39  size_t               size
    4040)
    4141{
  • cpukit/score/src/heapallocatealigned.c

    rbd59b348 r7ff6115  
    132132void *_Heap_Allocate_aligned(
    133133  Heap_Control *the_heap,
    134   ssize_t       size,
     134  size_t        size,
    135135  uint32_t      alignment
    136136)
  • cpukit/score/src/heapextend.c

    rbd59b348 r7ff6115  
    3939  Heap_Control        *the_heap,
    4040  void                *starting_address,
    41   ssize_t              size,
     41  size_t               size,
    4242  uint32_t            *amount_extended
    4343)
  • cpukit/score/src/heapresizeblock.c

    rbd59b348 r7ff6115  
    4848  Heap_Control *the_heap,
    4949  void         *starting_address,
    50   ssize_t       size,
     50  size_t        size,
    5151  uint32_t     *old_mem_size,
    5252  uint32_t     *avail_mem_size
  • cpukit/score/src/heapsizeofuserarea.c

    rbd59b348 r7ff6115  
    4343  Heap_Control        *the_heap,
    4444  void                *starting_address,
    45   ssize_t             *size
     45  size_t              *size
    4646)
    4747{
  • cpukit/score/src/pheapgetblocksize.c

    rbd59b348 r7ff6115  
    2020  Heap_Control        *the_heap,
    2121  void                *starting_address,
    22   ssize_t             *size
     22  size_t              *size
    2323)
    2424{
  • cpukit/score/src/wkspace.c

    rbd59b348 r7ff6115  
    2828void _Workspace_Handler_initialization(
    2929  void       *starting_address,
    30   ssize_t     size
     30  size_t      size
    3131)
    3232{
     
    6262 */
    6363void *_Workspace_Allocate(
    64   ssize_t   size
     64  size_t   size
    6565)
    6666{
     
    8282 */
    8383void *_Workspace_Allocate_or_fatal_error(
    84   ssize_t      size
     84  size_t      size
    8585)
    8686{
Note: See TracChangeset for help on using the changeset viewer.