NULL call to _Workspace_Free() via _Objects_Extend_information at startup

Peter Dufault dufault at hda.com
Tue Mar 1 00:09:19 UTC 2011


On Feb 28, 2011, at 6:58 , Joel Sherrill wrote:

> It should be
> 
>   if ( !_Heap_Is_block_in_heap( heap, block ) ) {
>     return false;
>   }
> _Heap_Protection_block_check( heap, block );
> 

I haven't found "_Heap_Is_block_in_heap" in my tags yet, however, I see this as a tertiary operation: Block is in heap, block is not in heap, block is NULL, just like malloc() / free():  block == NULL should be silently ignored.  IMHO.

Not that I've written anything that calls _Workspace_Free(), however, I routinely count on free(0) doing nothing and would probably like _Workspace_Free() to do the same thing.

> I am sorry you hit this.  Very good/bad timing. :)
> 

Timing is everything.

Peter
-----------------
Peter Dufault
HD Associates, Inc.      Software and System Engineering





More information about the users mailing list