mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
docs: Add high-level documentation about malloc failure
While I’m here. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
@@ -19,6 +19,17 @@ General considerations when programming with GLib
|
||||
<refsect1>
|
||||
<title>Writing GLib Applications</title>
|
||||
|
||||
<refsect2>
|
||||
<title>Memory Allocations</title>
|
||||
|
||||
<para>
|
||||
Unless otherwise specified, all functions which allocate memory in GLib will
|
||||
abort the process if heap allocation fails. This is because it is too hard to
|
||||
recover from allocation failures in any non-trivial program and, in particular,
|
||||
to test all the allocation failure code paths.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<refsect2>
|
||||
<title>Threads</title>
|
||||
|
||||
|
Reference in New Issue
Block a user