mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-11 16:32:58 +00:00
lib: Test against available swap
Even if we ignore the double-accounting bug in Linux, we need to be sure that the remaining swapspace is adequate for running our test as the system may be under load before we even start. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
+1
-1
@@ -132,7 +132,7 @@ intel_get_total_swap_mb(void)
|
||||
ret = sysinfo(&sysinf);
|
||||
assert(ret == 0);
|
||||
|
||||
retval = sysinf.totalswap;
|
||||
retval = sysinf.freeswap;
|
||||
retval *= sysinf.mem_unit;
|
||||
#elif defined(HAVE_SWAPCTL) /* Solaris */
|
||||
long pagesize = sysconf(_SC_PAGESIZE);
|
||||
|
||||
Reference in New Issue
Block a user