| 398 | #define dir_in_seg(_s, _i) ((CacheDirEntry *)(((char *)(_s)) + (SIZEOF_DIR * (_i)))) |
| 399 | |
| 400 | inline CacheDirEntry * |
| 401 | dir_from_offset(int64_t i, CacheDirEntry *seg) |
| 402 | { |
| 403 | #if DIR_DEPTH < 5 |
| 404 | if (!i) |
| 405 | return nullptr; |
| 406 | return dir_in_seg(seg, i); |
| 407 | #else |
| 408 | i = i + ((i - 1) / (DIR_DEPTH - 1)); |
| 409 | return dir_in_seg(seg, i); |
| 410 | #endif |
| 411 | } |
| 412 | |
| 413 | inline CacheDirEntry * |
| 414 | dir_bucket(int64_t b, CacheDirEntry *seg) |
no outgoing calls
no test coverage detected