[RTEMS Project] #3621: Statically initialize object information structures
RTEMS trac
trac at rtems.org
Mon Nov 26 12:50:51 UTC 2018
#3621: Statically initialize object information structures
------------------------------+-----------------------------
Reporter: Sebastian Huber | Owner: Sebastian Huber
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.1
Component: score | Version: 5
Severity: normal | Keywords:
Blocked By: | Blocking:
------------------------------+-----------------------------
Statically initialize the object information structures to make the
configuration easier to review and simplify the debugging.
The workspace size estimate generated by <rtems/confdefs.h> looks
currently like this:
{{{
const rtems_configuration_table Configuration = { ( ( ( (ssize_t)
((((((1 +
0) != 0 ? 1 : 0) * ((Objects_Maximum) ((1 + 0) & ~0x80000000U))) *
(sizeof(Configuration_Thread_control))) != 0 ? 1 : 0) * ((((((1 + 0) != 0
? 1 :
0) * ((Objects_Maximum) ((1 + 0) & ~0x80000000U))) *
(sizeof(Configuration_Thread_control)) + (2 * sizeof(uintptr_t) +
(sizeof(Heap_Protection_block_begin) +
sizeof(Heap_Protection_block_end)))) +
((((sizeof(Heap_Block)) + (8) - 1) - ((sizeof(Heap_Block)) + (8) - 1) %
(8))) -
1) - (((((1 + 0) != 0 ? 1 : 0) * ((Objects_Maximum) ((1 + 0) &
~0x80000000U)))
* (sizeof(Configuration_Thread_control)) + (2 * sizeof(uintptr_t) +
(sizeof(Heap_Protection_block_begin) +
sizeof(Heap_Protection_block_end)))) +
((((sizeof(Heap_Block)) + (8) - 1) - ((sizeof(Heap_Block)) + (8) - 1) %
(8)))
}}}
[more than 500 similar lines]
{{{
1) - (((sizeof(Configuration_Initial_Extensions) /
sizeof((Configuration_Initial_Extensions)[0])) *
sizeof(User_extensions_Switch_control) + (2 * sizeof(uintptr_t) +
(sizeof(Heap_Protection_block_begin) +
sizeof(Heap_Protection_block_end)))) +
((((sizeof(Heap_Block)) + (8) - 1) - ((sizeof(Heap_Block)) + (8) - 1) %
(8))) -
1) % ((((sizeof(Heap_Block)) + (8) - 1) - ((sizeof(Heap_Block)) + (8) - 1)
%
(8)))))) + 0 + 0 + (0 * 1024) + ((((2 * sizeof(uintptr_t) +
(sizeof(Heap_Protection_block_begin) +
sizeof(Heap_Protection_block_end)))) +
(8) - 1) - (((2 * sizeof(uintptr_t) + (sizeof(Heap_Protection_block_begin)
+
sizeof(Heap_Protection_block_end)))) + (8) - 1) % (8)) ),
}}}
The object controls reside on the heap even for fixed object count
configuration. Using a statically allocated array makes it easier to find
the objects during debugging.
--
Ticket URL: <http://devel.rtems.org/ticket/3621>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list