Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
88
static bool chance(size_t perc, random_t r) {
89
return (pick(r) % 100 <= perc);
90
}
91
92
static void* alloc_items(size_t items, random_t r) {
93
if (chance(1, r)) {
Callers
4
alloc_items
Function · 0.85
stress
Function · 0.85
test_stress
Function · 0.85
leak
Function · 0.85
Calls
1
pick
Function · 0.85
Tested by
no test coverage detected