mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-07 16:06:25 +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:
parent
37773d91d9
commit
ea332b64b6
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user