Large memory allocation errors

Hans Lambermont Hans.Lambermont at garg.mpn.cp.philips.com
Thu Oct 28 08:10:45 UTC 1999


Russ Allbery wrote:

> Historically, INN has always reported memory allocation failures
> intentionally using the wrong format specifier for printf (%d instead
> of %lu) so that particularly large allocations will show as negative,
> presumably with the intent of flagging them more clearly as absurd.
snip
> personally would rather just use the right specifier; I think that the
> negative sign is more confusing than helpful.  But I don't have a
> particularly strong opinion.

I think we should not try to tell things this way to end-users either.
We'd better use the proper %lu and add some extra check that logs the
error.

Hans Lambermont


More information about the inn-workers mailing list