MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / chance

Function chance

3rd/mimalloc-2.0.9/test/test-stress.c:88–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88static bool chance(size_t perc, random_t r) {
89 return (pick(r) % 100 <= perc);
90}
91
92static void* alloc_items(size_t items, random_t r) {
93 if (chance(1, r)) {

Callers 4

alloc_itemsFunction · 0.85
stressFunction · 0.85
test_stressFunction · 0.85
leakFunction · 0.85

Calls 1

pickFunction · 0.85

Tested by

no test coverage detected