diff --git a/compiler-rt/test/scudo/rss.c b/compiler-rt/test/scudo/rss.c index f98bf9536ea4..0b76857b9a4d 100644 --- a/compiler-rt/test/scudo/rss.c +++ b/compiler-rt/test/scudo/rss.c @@ -30,7 +30,8 @@ static void *allocs[kNumAllocs]; int main(int argc, char *argv[]) { int returned_null = 0; for (int i = 0; i < kNumAllocs; i++) { - if ((i & 0xf) == 0) + // sleep for 100ms every 8 allocations, to allow the RSS check to catch up. + if (i != 0 && (i & 0x7) == 0) usleep(100000); allocs[i] = malloc(kAllocSize); if (allocs[i])