tests: regressions: Allow test-big-heap to work on machines with less memory.

This test would fail on machines with around 4 GB of free memory.
Adjust the test so it would now work on such machines (it will however
still fail on a machine with around 2 GB of free memory).
This commit is contained in:
Richard W.M. Jones
2016-01-20 17:05:53 +00:00
parent ce5607895f
commit 4a0905ac36

View File

@@ -55,11 +55,11 @@ main (int argc, char *argv[])
* contiguous memory. Therefore skip the test if the calloc call
* fails.
*/
/* XXX This test also fails for machines with ~ 4 GB of RAM,
* because the 2 GB allocation succeeds here, but the fork
* fails (since it will require around 2 * 2 GB).
/* XXX This test also fails for machines with ~ 2 GB of RAM,
* because the 1.1 GB allocation succeeds here, but the fork
* fails (since it will require around 2 * 1.1 GB).
*/
mem = calloc (2 * 1024, 1024 * 1024);
mem = calloc (1100, 1024 * 1024);
if (mem == NULL) {
fprintf (stderr,
"%s: test skipped because cannot allocate enough "