To much memory allocated in _Objects_Extend_information()?

Chris Johns chrisj at rtems.org
Sat Jul 16 00:32:41 UTC 2005


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.
> 

It is complex due to the way it extended the existing design without 
changing any of the existing performance requirements. Specifically 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?
> 

Have you read the Unlimited.txt file in the score/src directory ?

I have added the file into the Wiki. You can find here:

  http://www.rtems.org/phpwiki/index.php/SuperCoreObjects

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.

If you find something of interest please add it to the Wiki. This is a 
difficult piece of code and any supporting documentation is more than 
welcome.

> 
> Thanks for enlighten me,
> 


-- 
  Chris Johns



More information about the users mailing list