MCPcopy Create free account
hub / github.com/apple/foundationdb / getSizeCode

Function getSizeCode

flow/FastAlloc.cpp:277–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275
276#if FAST_ALLOCATOR_DEBUG
277static int64_t getSizeCode(int i) {
278 switch (i) {
279 case 16:
280 return 1;
281 case 32:
282 return 2;
283 case 64:
284 return 3;
285 case 96:
286 return 4;
287 case 128:
288 return 5;
289 case 256:
290 return 6;
291 case 512:
292 return 7;
293 case 1024:
294 return 8;
295 case 2048:
296 return 9;
297 case 4096:
298 return 10;
299 case 8192:
300 return 11;
301 default:
302 return 12;
303 }
304}
305#endif
306
307template <int Size>

Callers 2

checkMethod · 0.85
getMagazineMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected