tests/gem_tiled_swapping: be more conservative with the swap requirements

Blew up and angered the OOM killer on one of my machines.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter 2012-01-23 17:18:53 +01:00
parent 98129fa2ff
commit 8d4d8b00ed

View File

@ -112,6 +112,11 @@ main(int argc, char **argv)
return 77;
}
if (intel_get_total_ram_mb() / 4 > intel_get_total_swap_mb()) {
printf("not enough swap detected\n");
return 77;
}
for (i = 0; i < count; i++)
bo_handles[i] = create_bo_and_fill(fd);