From: Reinhard T. <sir...@ta...> - 2006-03-09 13:08:45
|
Brian J. Tarricone wrote: > Actually, to be strictly pedantic, on a default-configured Linux, > malloc() and friends will never, ever return NULL. You can view that as > a bug if you want (the malloc() manpage does), but that's the reality. Err, I'm sorry, but can you point me which version of malloc(3) do you read? Mine (ubuntu) reads like this: # RETURN VALUE # # For calloc() and malloc(), the value returned is a pointer to the # allocated memory, which is suitably aligned for any kind of variable, # or NULL if the request fails. I'm pretty confused by your statement that malloc() and friends would never ever return NULL. Greetings, Reinhard |