Skip to content

Commit c240c4d

Browse files
committed
stress-pagescatter: use shim_mincore instead of mincore, voidify populate
Fixes: #633 Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
1 parent 40b4bab commit c240c4d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

stress-pagescatter.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ static void *stress_pagescatter_mmap(
102102
#if defined(MAP_POPULATE)
103103
if (populate)
104104
flags |= MAP_POPULATE;
105+
#else
106+
(void)populate;
105107
#endif
106108

107109
/* random address hint */
@@ -119,7 +121,7 @@ static void *stress_pagescatter_mmap(
119121
errno = 0;
120122

121123
/* if page is resident, it's mapped, try again */
122-
if (mincore((void *)addr, page_size, vec) == 0)
124+
if (shim_mincore((void *)addr, page_size, vec) == 0)
123125
continue;
124126
/* if addr can be madvised then it's mapped, try again */
125127
if (madvise((void *)addr, page_size, MADV_NORMAL) == 0)

0 commit comments

Comments
 (0)