Index: src/interface.c =================================================================== --- src/interface.c (révision 4808) +++ src/interface.c (copie de travail) @@ -416,10 +416,6 @@ void fill_list_item(gint i, GtkTreeIter *iter) { - static gint pagesize = 0; - if (pagesize == 0) - pagesize = getpagesize(); - if(iter != NULL) { struct task *task = &g_array_index(task_array, struct task, i); @@ -428,7 +424,7 @@ gchar *ppid = g_strdup_printf("%i", task->ppid); gchar *state = g_strdup_printf("%s", task->state); gchar *vsize = g_strdup_printf("%i MB", task->vsize/1024/1024); - gchar *rss = g_strdup_printf("%i MB", task->rss*pagesize/1024/1024); + gchar *rss = g_strdup_printf("%i MB", task->rss/1024/1024); gchar *name = g_strdup_printf("%s", task->name); gchar *uname = g_strdup_printf("%s", task->uname); gchar *time = g_strdup_printf("%0d%%", (guint)task->time_percentage); Index: src/xfce-taskmanager-linux.h =================================================================== --- src/xfce-taskmanager-linux.h (révision 4808) +++ src/xfce-taskmanager-linux.h (copie de travail) @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -38,6 +39,8 @@ #define SIGNAL_CONT SIGCONT #define SIGNAL_STOP SIGSTOP +static gint pagesize = 0; + struct task get_task_details(gint pid); GArray *get_task_list(void); gboolean get_system_status(system_status *sys_stat); Index: src/xfce-taskmanager-linux.c =================================================================== --- src/xfce-taskmanager-linux.c (révision 4808) +++ src/xfce-taskmanager-linux.c (copie de travail) @@ -41,6 +41,14 @@ task.pid = -1; task.checked = FALSE; + if (pagesize == 0) + { + pagesize = sysconf(_SC_PAGESIZE); + if (pagesize == 0) + pagesize = 4*1024; + } + + if((task_file = fopen(filename,"r")) != NULL) { while(fgets(buffer_status, sizeof(buffer_status), task_file) != NULL) @@ -102,6 +110,7 @@ task.old_time = task.time; task.time = stime + utime; task.time_percentage = 0; + task.rss *= pagesize; } task.uid = status.st_uid; passwdp = getpwuid(task.uid);