FreeBSD Bugzilla – Attachment 182426 Details for
Bug 219155
[PATCH] x11/xfce4-taskmanager fix free mem calculation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
correct freemem calculation
xfce4-taskmanager.patch (text/plain), 2.56 KB, created by
Ivan Rozhuk
on 2017-05-09 02:18:18 UTC
(
hide
)
Description:
correct freemem calculation
Filename:
MIME Type:
Creator:
Ivan Rozhuk
Created:
2017-05-09 02:18:18 UTC
Size:
2.56 KB
patch
obsolete
>Index: x11/xfce4-taskmanager/files/patch-src__task-manager-freebsd.c >=================================================================== >--- x11/xfce4-taskmanager/files/patch-src__task-manager-freebsd.c (revision 440460) >+++ x11/xfce4-taskmanager/files/patch-src__task-manager-freebsd.c (working copy) >@@ -15,7 +15,7 @@ > > if (sysctlbyname (name, &buf, &len, NULL, 0) < 0) > return 0; >-@@ -41,13 +41,13 @@ get_mem_by_bytes (const gchar *name) >+@@ -41,24 +41,25 @@ get_mem_by_bytes (const gchar *name) > guint64 > get_mem_by_pages (const gchar *name) > { >@@ -31,16 +31,18 @@ > } > > gboolean >-@@ -55,10 +55,10 @@ get_memory_usage (guint64 *memory_total, >+ get_memory_usage (guint64 *memory_total, guint64 *memory_free, guint64 *memory_cache, guint64 *memory_buffers, guint64 *swap_total, guint64 *swap_free) > { > /* Get memory usage */ >++ /* https://wiki.freebsd.org/Memory */ > { > - *memory_total = (guint64) get_mem_by_bytes ("hw.physmem");; > + *memory_total = get_mem_by_bytes ("hw.physmem");; > *memory_free = get_mem_by_pages ("vm.stats.vm.v_free_count"); >- *memory_cache = get_mem_by_pages ("vm.stats.vm.v_inactive_count"); >+- *memory_cache = get_mem_by_pages ("vm.stats.vm.v_inactive_count"); > - *memory_buffers = (guint64) get_mem_by_bytes ("vfs.bufspace"); >-+ *memory_buffers = get_mem_by_bytes ("vfs.bufspace"); >++ *memory_cache = 0; // get_mem_by_pages ("vm.stats.vm.v_inactive_count"); >++ *memory_buffers = 0; // Only usable by the kernel // get_mem_by_bytes ("vfs.bufspace"); > } > > /* Get swap usage */ >Index: x11/xfce4-taskmanager/files/patch-src_process-tree-view.c >=================================================================== >--- x11/xfce4-taskmanager/files/patch-src_process-tree-view.c (nonexistent) >+++ x11/xfce4-taskmanager/files/patch-src_process-tree-view.c (working copy) >@@ -0,0 +1,19 @@ >+--- src/process-tree-view.c.orig 2017-02-05 21:41:57 UTC >++++ src/process-tree-view.c >+@@ -397,6 +397,8 @@ cb_send_signal (GtkMenuItem *mi, gpointe >+ GtkTreeSelection *selection; >+ GtkWidget *treeview; >+ treeview = g_object_get_data (G_OBJECT (mi), "treeview"); >++ if (NULL == treeview) >++ return; >+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); >+ gtk_tree_selection_unselect_all (selection); >+ } >+@@ -451,6 +453,7 @@ build_context_menu (XtmProcessTreeView * >+ >+ mi = gtk_menu_item_new_with_label (_("Kill")); >+ g_object_set_data (G_OBJECT (mi), "pid", GUINT_TO_POINTER (pid)); >++ g_object_set_data (G_OBJECT (mi), "treeview", treeview); >+ gtk_container_add (GTK_CONTAINER (menu), mi); >+ g_signal_connect (mi, "activate", G_CALLBACK (
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 219155
:
182426
|
185589