commit | 02bf26321ca9ec73b7e4ecbeccf4780409717e07 | [log] [tgz] |
---|---|---|
author | David CARLIER <devnexen@gmail.com> | Mon Feb 15 20:51:35 2021 +0000 |
committer | GitHub <noreply@github.com> | Mon Feb 15 21:51:35 2021 +0100 |
tree | 6c7e35120787a576e103c93198500c2a928f7479 | |
parent | 92b7e5ec3e0e34ec52976f084b3f99434885f520 [diff] |
Mac OS page clearing implementation update. (#225)
diff --git a/rpmalloc/rpmalloc.c b/rpmalloc/rpmalloc.c index 8be3c80..e39a5cb 100644 --- a/rpmalloc/rpmalloc.c +++ b/rpmalloc/rpmalloc.c
@@ -907,7 +907,9 @@ } } else { #if defined(MADV_FREE_REUSABLE) - if (madvise(address, size, MADV_FREE_REUSABLE)) + int ret; + while ((ret = madvise(address, size, MADV_FREE_REUSABLE)) == -1 && errno == EAGAIN); + if (ret == -1 && errno != 0) #elif defined(MADV_FREE) if (madvise(address, size, MADV_FREE)) #endif