NULL call to _Workspace_Free() via _Objects_Extend_information at startup
Peter Dufault
dufault at hda.com
Tue Mar 1 08:05:06 UTC 2011
On Mar 1, 2011, at 2:44 , Sebastian Huber wrote:
> do you experience this behavior with the debug variant of RTEMS or with the
> normal configuration?
Debugging enabled.
>
> A call to _Heap_Free(NULL) must return true.
You mean a call to _Heap_Free(heap_control, NULL) must return true. Fine, someone must update the interface documentation to add that requirement.
Just to be a trouble-maker, what should these functions return given a NULL heap block pointer? Currently it is unspecified.
_Heap_Block_size(block), _Heap_is_free(block), _Heap_is_block_in_heap(const Heap_Control *heap, const Heap_Block *block).
Ideally the definition should be derived from a concise definition of what a NULL heap block pointer means, and those operations that are undefined should be specified as undefined.
One could argue that _Heap_Block_size(0) == 0, _Heap_is_free(0) == true, _Heap_is_block_in_heap(0, *) == true. I'm not arguing it, though, since I'm not presenting the "concise definition" I mention above.
Peter
-----------------
Peter Dufault
HD Associates, Inc. Software and System Engineering
More information about the users
mailing list