Limit working set size also with available ram.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72255
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
bool __igt_fork_helper(struct igt_helper_process *proc)
{
pid_t pid;
- sighandler_t oldsig;
int id;
assert(!proc->running);
* that inserting sufficient amounts of printf or other delays makes
* this unnecessary.
*/
- oldsig = signal(SIGQUIT, SIG_DFL);
switch (pid = fork()) {
case -1:
igt_assert(0);
return true;
default:
- signal(SIGQUIT, oldsig);
-
proc->running = true;
proc->pid = pid;
proc->id = id;
max = gem_aperture_size (fd) / (1024 * 1024) / 2;
if (num_buffers > max)
num_buffers = max;
+
+ max = intel_get_total_ram_mb() * 3 / 4;
+ if (num_buffers > max)
+ num_buffers = max;
}
for (i = 0; i < ARRAY_SIZE(access_modes); i++)