Skip to content

Commit

Permalink
Add memory size in octets
Browse files Browse the repository at this point in the history
  • Loading branch information
Syllo committed Mar 29, 2018
1 parent 42083dc commit 2372b68
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ static unsigned int sizeof_process_field[] = {
[process_user] = 4,
[process_gpu_id] = 3,
[process_type] = 7,
[process_memory] = 6,
[process_memory] = 14,
[process_command] = 0,
};

Expand Down Expand Up @@ -823,7 +823,8 @@ static void print_processes_on_screen(
if (size == sizeof_process_field[process_gpu_id]+1)
pid_str[sizeof_process_field[process_gpu_id]] = '\0';
size = snprintf(memory, sizeof_process_field[process_memory]+1,
"%.1f%%", proc[i+offset].mem_percentage);
"%lluMo %.1f%%", proc[i+offset].used_memory/1000000,
proc[i+offset].mem_percentage);
mvwprintw(win, write_at, 0, "%*s %*s %*s",
sizeof_process_field[process_pid],
pid_str,
Expand Down

0 comments on commit 2372b68

Please sign in to comment.