Changeset fb9e98e in rtems


Ignore:
Timestamp:
Apr 7, 2014, 12:50:28 PM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
94086a9
Parents:
57740ce8
git-author:
Sebastian Huber <sebastian.huber@…> (04/07/14 12:50:28)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/07/14 12:51:31)
Message:

score: Fix workspace size estimate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/include/confdefs.h

    r57740ce8 rfb9e98e  
    10131013#define _Configure_Zero_or_One(_number) ((_number) ? 1 : 0)
    10141014
     1015#define _Configure_Align_up(_val, _align) \
     1016  (((_val) + (_align) - 1) & ~((_align) - 1))
     1017
    10151018/**
    10161019 * This is a helper macro used in calculations in this file.  It is used
     
    10211024#define _Configure_From_workspace(_size) \
    10221025   (ssize_t) (_Configure_Zero_or_One(_size) * \
    1023      ((_size) + HEAP_BLOCK_HEADER_SIZE + CPU_HEAP_ALIGNMENT - 1))
     1026     _Configure_Align_up((_size) + HEAP_BLOCK_HEADER_SIZE, CPU_HEAP_ALIGNMENT))
    10241027
    10251028/**
     
    10501053 *       objects.
    10511054 */
    1052 #define _Configure_Object_RAM(_number, _size) \
    1053   ( _Configure_From_workspace(_Configure_Max_Objects(_number) * (_size)) + \
     1055#define _Configure_Object_RAM(_number, _size) ( \
     1056    _Configure_From_workspace(_Configure_Max_Objects(_number) * (_size)) + \
    10541057    _Configure_From_workspace( \
    1055       (_Configure_Zero_or_One(_number) * \
    1056        (_Configure_Max_Objects(_number) + 1) * sizeof(Objects_Control *)) + \
    1057       (_Configure_Zero_or_One(_number) * \
    1058        (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *))) \
     1058      _Configure_Zero_or_One(_number) * ( \
     1059        (_Configure_Max_Objects(_number) + 1) * sizeof(Objects_Control *) + \
     1060        _Configure_Align_up(sizeof(void *), CPU_ALIGNMENT) + \
     1061        _Configure_Align_up(sizeof(uint32_t), CPU_ALIGNMENT) \
     1062      ) \
    10591063    ) \
    10601064  )
Note: See TracChangeset for help on using the changeset viewer.