]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
tests: hash-large: use private mmap()
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Wed, 20 Apr 2016 14:19:32 +0000 (16:19 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Wed, 20 Apr 2016 14:19:34 +0000 (16:19 +0200)
This reduces the memory usage of the test significantly on Linux.

tests/slow/hash-large.c

index 96ebd537659cae5ab726fc5a5ef0cddd4230e76c..3a563b781ad398612dfce702ecbbaaf02bf47239 100644 (file)
@@ -41,7 +41,7 @@ static size_t _mmap_size;
 static void *get_mem(size_t size)
 {
        _mmap_size = size;
-       return mmap(NULL, size, PROT_READ, MAP_SHARED|MAP_ANONYMOUS, -1, 0);
+       return mmap(NULL, size, PROT_READ, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
 }
 
 static void put_mem(void *mem)