[Tinyos-devel] ENOMEM in TinyError.h

Matt Welsh mdw at eecs.harvard.edu
Tue May 6 08:40:19 PDT 2008


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.







On May 6, 2008, at 11:31 AM, Philip Levis wrote:
>
> On May 6, 2008, at 7:12 AM, Matt Welsh wrote:
>> Would it be possible to add an error code ENOMEM to TinyError.h?
>
> What interfaces should return ENOMEM? When would you use ENOMEM  
> rather than ESIZE?
>
> (just trying to understand its use)
>
> Phil



More information about the Tinyos-devel mailing list