Costin Manolache wrote:
Mladen Turk wrote:
David Rees wrote:
Are you sure it's a good idea to wait until it crashes rather than
fail in a controlled method? How much overhead is there to check
aw->name for NULL? Can't be much...
Yes I am.
Look, if the system can not alloc 1000 bytes of memory what's
the purpose to continue?
Mt.
Are you joking :-) ?
No :).
It would make sense if we expect that malloc call might fail due
the fact that we are trying to alloc potentially large memory and
then fall back.
If we can not alloc couple of bytes from the system, then the
entire system is unstable.
Just look at httpd or apr sources. There's almost no checks for
malloc success on small objects. They are presumed to return valid
memory block.
At least do an printf and exit(), coredump is never good (some systems
don't collect the core - so the user will have no idea what just
happened ).
Well, IMO it would fail long before our module is called.
Also on first write to NULL every system will give the user a pretty
good warning thought :).
MT.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]