Re: Completion of error handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 2, 2010 at 2:42 PM, Markus Elfring <Markus.Elfring@xxxxxx> wrote:
> Nicolas wrote:
>> At least on Linux, most of those functions simply cannot fail.
>
> Would you like to support software environments that work without a
> famous out-of-memory killer?

In many cases on Linux systems, you don't get the OOM notification
anyway until you try to *use* the memory, not at allocation time.  So
even checking the results of malloc() won't always save you (although
*not* checking can make problems even worse).

However, for functions that can't allocate memory at all, it's extra
pointless to worry about.

>> There is just no dynamic memory allocation involved.
>
> I find this opinion strange.

This isn't an opinion; because it's open source, you can actually look
at the source code and find out that many system calls don't do memory
allocation at all.

Avery
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]