To much memory allocated in _Objects_Extend_information()?
John Alexandersson
john.alexandersson at space.se
Mon Jul 18 10:53:11 UTC 2005
==> Chris Johns writes:
CJ> John Alexandersson wrote:
>> Hi all,
>> I'm sitting here looking at the code in
>> score/src/objectextendinformation.c and I don't quite understand how
>> the size of the memory to allocate is calculated.
>>
CJ> It is complex due to the way it extended the existing design without
CJ> changing any of the existing performance requirements. Specifically
CJ> the id to object lookup time.
>> More precise, it is the last part that I find strange:
>> ((maximum + minimum_index) * sizeof(Objects_Control *))
>> ^^^^^^^^^^^^^^^
>> Is it correct behaviour to _add_ minimum_index? Shouldn't it be
>> subtracted instead? (maximum - minimum_index)?
>> If it, in fact, is the correct behaviour, could some one please
>> explain why?
>>
CJ> Have you read the Unlimited.txt file in the score/src directory ?
I have now... :)
...and suddenly it all starts to make sense, kind-of.
(I still need some time to fully digest it, but the overall idea seems
reasonably clear now.)
CJ> I have added the file into the Wiki. You can find here:
CJ> http://www.rtems.org/phpwiki/index.php/SuperCoreObjects
CJ> It needs some more formatting which I will get to soon.
>> To me it looks like too much memory is allocated here, but since I
>> haven't quite got a grip of the overall handling of Objects yet, I
>> might very well be wrong.
CJ> If you find something of interest please add it to the Wiki. This is a
CJ> difficult piece of code and any supporting documentation is more than
CJ> welcome.
One more question appeared, though.
In Unlimited.txt it says that this code was originally added to RTEMS
v4.0.0.
Just to make sure; the implementation hasn't changed in any
significant way since v4.0.0, that makes this text obsolete?
Thanks!
(and thanks to Till as well...)
/John Alexandersson
/"\
\ / ASCII Ribbon Campaign
X against HTML email & vCards
/ \ Keep Email as ASCII
More information about the users
mailing list