From: Florian Weimer <fweimer@redhat.com>
To: Konstantin Kharlamov <hi-angel@yandex.ru>
Cc: libc-help@sourceware.org
Subject: Re: Q: System behaviour in out of memory situation
Date: Mon, 05 Jun 2023 08:39:56 +0200 [thread overview]
Message-ID: <87pm6a1kg3.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <af7ffa95539f1028f628aa54f67d869d58c681ff.camel@yandex.ru> (Konstantin Kharlamov's message of "Mon, 05 Jun 2023 03:28:00 +0300")
* Konstantin Kharlamov:
> 2. Is it unrealistic to expect ENOMEM from `malloc()`? That is because
> α) most systems have OOM-killer enabled, so instead of ENOMEM some app
> will get killed β) In absence of OOM-killer you'll get virtual memory
> successfully allocated, which returns us to 1.
malloc can return ENOMEM for other reasons, for example if the available
address space is exhausted, or if the kernel mapping limit per process
is exceeded.
Thanks,
Florian
prev parent reply other threads:[~2023-06-05 6:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-05 0:28 Konstantin Kharlamov
2023-06-05 4:41 ` tomas
2023-06-05 6:39 ` Florian Weimer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pm6a1kg3.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=hi-angel@yandex.ru \
--cc=libc-help@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).