**** Merged from HEAD ****
Use `(1L << feature)' instead of `(1 << feature)' to avoid problems with integer overflows when we add more fields.
This commit is contained in:
@@ -26,12 +26,12 @@
|
||||
#include <glibtop/procmem.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_mem =
|
||||
(1 << GLIBTOP_PROC_MEM_VSIZE) + (1 << GLIBTOP_PROC_MEM_RSS) +
|
||||
(1 << GLIBTOP_PROC_MEM_RSS_RLIM);
|
||||
(1L << GLIBTOP_PROC_MEM_VSIZE) + (1L << GLIBTOP_PROC_MEM_RSS) +
|
||||
(1L << GLIBTOP_PROC_MEM_RSS_RLIM);
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_mem_statm =
|
||||
(1 << GLIBTOP_PROC_MEM_SIZE) + (1 << GLIBTOP_PROC_MEM_RESIDENT) +
|
||||
(1 << GLIBTOP_PROC_MEM_SHARE);
|
||||
(1L << GLIBTOP_PROC_MEM_SIZE) + (1L << GLIBTOP_PROC_MEM_RESIDENT) +
|
||||
(1L << GLIBTOP_PROC_MEM_SHARE);
|
||||
|
||||
#ifndef LOG1024
|
||||
#define LOG1024 10
|
||||
|
Reference in New Issue
Block a user