[rtems commit] rbheap: New files

Sebastian Huber sebastian.huber at embedded-brains.de
Sun Apr 15 10:56:04 UTC 2012


On 14/04/12 18:20, Gedare Bloom wrote:
> I have a couple concerns.
>
> First is the naming "rbheap";. I see it is implementing a memory
> manager using the rbtree and a couple chain controls. It's not really
> a heap so much as a custom free page allocator.

 From my point of view everything that implements the malloc() and 
free() interface is a heap.  Why do you think this is not a heap?

> Second is the code placement. I'm not convinced this is best to just
> shim into the sapi layer.

Where else would you place this?

> The functionality is reminiscent of the
> Region Manager. What functionality is missing that this code is unable
> to use existing classic or score services to achieve? I have a feeling
> we could generalize the approach taken here by implementing an Arena
> Manager somewhere.

The region manager stores administration data in the managed memory 
area.  The rbheap separates this.  You can use it to implement a task 
stack allocator where each task has only access to is own task stack.

> Third is the use of the word "pages". Unless we are referring to
> fixed-size ranges of virtual memory I think we should avoid this word
> since it has a fairly common technical meaning and connotation as an
> OS concept.

The region manager and the first-fit heap code uses also this notation.  
What do you think about "chunk" instead of "page"?

> Fourth is the lack of documentation. This is an addition to the public
> API and should be reflected somewhere in docu and the release notes.

Ok.

> Fifth is the lack of review before committing;)

Sorry, we can do the review now.

-- 
Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.




More information about the devel mailing list