summaryrefslogtreecommitdiff
path: root/lib/ephy-smaps.h
diff options
context:
space:
mode:
authorXan Lopez <xlopez@igalia.com>2011-06-27 18:18:58 +0200
committerXan Lopez <xlopez@igalia.com>2011-06-27 19:34:52 +0200
commit836a072b8a9404be59187f66f46c64998670a534 (patch)
tree09e8769a144518730455cf40e62679c2e473a7fe /lib/ephy-smaps.h
parentfe909aa62629a5994dd643450b0de45e0e3f508d (diff)
downloadepiphany-836a072b8a9404be59187f66f46c64998670a534.tar.gz
Implement about:memory
Gives an estimate of how much memory the browser process is using, extracted from /proc/$PID/smaps. Only works in GNU/Linux systems.
Diffstat (limited to 'lib/ephy-smaps.h')
-rw-r--r--lib/ephy-smaps.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/lib/ephy-smaps.h b/lib/ephy-smaps.h
new file mode 100644
index 000000000..728198656
--- /dev/null
+++ b/lib/ephy-smaps.h
@@ -0,0 +1,50 @@
+/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/*
+ * Copyright © 2011 Igalia S.L.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef EPHY_SMAPS_H
+#define EPHY_SMAPS_H
+
+#include <glib-object.h>
+
+#define EPHY_TYPE_SMAPS (ephy_smaps_get_type ())
+#define EPHY_SMAPS(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), EPHY_TYPE_SMAPS, EphySMaps))
+#define EPHY_SMAPS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EPHY_TYPE_SMAPS, EphySMapsClass))
+#define EPHY_IS_SMAPS(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), EPHY_TYPE_SMAPS))
+#define EPHY_IS_SMAPS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EPHY_TYPE_SMAPS))
+#define EPHY_SMAPS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EPHY_TYPE_SMAPS, EphySMapsClass))
+
+typedef struct _EphySMapsPrivate EphySMapsPrivate;
+
+typedef struct {
+ GObject parent;
+
+ EphySMapsPrivate *priv;
+} EphySMaps;
+
+typedef struct {
+ GObjectClass parent;
+
+} EphySMapsClass;
+
+GType ephy_smaps_get_type (void);
+EphySMaps * ephy_smaps_new (void);
+char * ephy_smaps_to_html (EphySMaps *smaps);
+
+#endif /* EPHY_SMAPS_H */