File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 22
33#include <OS.h>
44
5- enum { FFMaxNSwap = 8 };
6-
75const char * ffDetectSwap (FFSwapResult * swap )
86{
97 system_info info ;
108 if (get_system_info (& info ) != B_OK )
119 return "Error getting system info" ;
1210
13- swap -> bytesTotal = B_PAGE_SIZE * info .max_swap_pages ;
14- swap -> bytesUsed = B_PAGE_SIZE * (info .max_swap_pages - info .free_swap_pages );
11+ swap -> bytesTotal = B_PAGE_SIZE * ( uint64_t ) info .max_swap_pages ;
12+ swap -> bytesUsed = B_PAGE_SIZE * (uint64_t ) ( info .max_swap_pages - info .free_swap_pages );
1513
1614 return NULL ;
1715}
Original file line number Diff line number Diff line change 77
88const char * ffDetectSwap (FFSwapResult * swap )
99{
10- // #620
10+ // Ref: #620
1111 char buf [PROC_FILE_BUFFSIZ ];
1212 ssize_t nRead = ffReadFileData ("/proc/meminfo" , ARRAY_SIZE (buf ) - 1 , buf );
1313 if (nRead < 0 )
You can’t perform that action at this time.
0 commit comments