mem/oom: check for multiple outcomes if overcommit_memory is 0 or 1

There is no guarantee that mmap() will fail before OOM tries to kill the
process if overcommit is set to 0 or 1. So allow such tests to
PASS if child is killed with SIGKILL.

This patch adds 2 parameters to oom()/testoom() functions:
  retcode       - expected child return code
  allow_sigkill - flag which specifies if child killed by SIGKILL
                  is also PASS result

Child process will return 0 if all allocations succeeded,
otherwise it returns last errno.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
mem/lib: optimize how alloc_mem dirties pages

There's no need to write pattern across whole range,
just make sure we touch every page.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>