[Tinyos-devel] ENOMEM in TinyError.h

Philip Levis pal at cs.stanford.edu
Tue May 6 09:03:48 PDT 2008


On May 6, 2008, at 8:40 AM, Matt Welsh wrote:
> An interface that attempts to allocate memory and is unable to do  
> so. This is consistent with UNIX semantics and would be familiar to  
> many programmers.
>
> ESIZE is not the same thing. The description is "the parameter  
> passed is too big". That could be because the interface does not  
> support values as large as the parameter value, which is different  
> than being currently unable to perform a memory allocation that  
> would otherwise have succeeded.
>
> More generally this could be captured with an ENORESOURCE which  
> says that the resources required to process the request -- whatever  
> they are -- are not available. ESIZE is not really appropriate  
> since it might have nothing to do with any parameter passed to the  
> interface.

Right: I guess my inquiry came from the question, given TinyOS's  
static allocation policy and pass semantics for buffers, whether  
ENOMEM makes sense. What interface would need it?

Phil



More information about the Tinyos-devel mailing list