[gobject-introspection/wip/hadess/add-memory-monitor: 4/4] Add GMemoryMonitor to glib annotations
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/wip/hadess/add-memory-monitor: 4/4] Add GMemoryMonitor to glib annotations
- Date: Thu, 21 Nov 2019 09:35:23 +0000 (UTC)
commit 78be42d6dde2c43ccad41770add53af3af839929
Author: Bastien Nocera <hadess hadess net>
Date: Thu Nov 21 10:32:39 2019 +0100
Add GMemoryMonitor to glib annotations
gir/gio-2.0.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
---
diff --git a/gir/gio-2.0.c b/gir/gio-2.0.c
index d0f5b80a..e5c01e0c 100644
--- a/gir/gio-2.0.c
+++ b/gir/gio-2.0.c
@@ -2110,6 +2110,42 @@
*/
+/**
+ * GMemoryMonitor:
+ *
+ * #GMemoryMonitor monitors system memory and indicates when
+ * the system is low on memory.
+ *
+ * Since: 2.64
+ */
+
+
+/**
+ * GMemoryMonitor::low-memory-warning:
+ * @monitor: a #GMemoryMonitor
+ * @level: the #GMemoryMonitorWarningLevel warning level
+ *
+ * Emitted when the system is running low on free memory. The signal
+ * handler should then take the appropriate action depending on the
+ * warning level. See the #GMemoryMonitorWarningLevel documentation for
+ * details.
+ *
+ * Since: 2.64
+ */
+
+
+/**
+ * GMemoryMonitorInterface:
+ * @g_iface: The parent interface.
+ * @low_memory_warning: the virtual function pointer for the
+ * #GMemoryMonitor::low-memory-warning signal.
+ *
+ * The virtual function table for #GMemoryMonitor.
+ *
+ * Since: 2.64
+ */
+
+
/**
* GMemoryOutputStream:data:
*
@@ -6889,6 +6925,32 @@
*/
+/**
+ * SECTION:gmemorymonitor
+ * @title: GMemoryMonitor
+ * @short_description: Memory usage monitor
+ * @include: gio/gio.h
+ *
+ * #GMemoryMonitor will monitor system memory and suggest to the application
+ * when to free memory so as to leave more room for other applications.
+ * It is implemented on Linux using the [Low Memory
Monitor](https://gitlab.freedesktop.org/hadess/low-memory-monitor/)
+ * ([API documentation](https://hadess.pages.freedesktop.org/low-memory-monitor/)).
+ *
+ * There is also an implementation for use inside Flatpak sandboxes.
+ *
+ * Possible actions to take when the signal is received are:
+ * - Free caches
+ * - Save files that haven't been looked at in a while to disk, ready to be reopened when needed
+ * - Run a garbage collection cycle
+ * - Try and compress fragmented allocations
+ * - Exit on idle if the process has no reason to stay around
+ *
+ * See #GMemoryMonitorWarningLevel for details on the various warning levels.
+ *
+ * Since: 2.64
+ */
+
+
/**
* SECTION:gmemoryoutputstream
* @short_description: Streaming output operations on memory chunks
@@ -27308,6 +27370,16 @@
*/
+/**
+ * g_memory_monitor_dup_default:
+ *
+ * Gets a reference to the default #GMemoryMonitor for the system.
+ *
+ * Returns: (transfer full): a new reference to the default #GMemoryMonitor
+ * Since: 2.64
+ */
+
+
/**
* g_memory_output_stream_get_data:
* @ostream: a #GMemoryOutputStream
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]