| 343 | } |
| 344 | |
| 345 | static int l2_flush(struct l2_table *l2tbl) { |
| 346 | if (nullptr == l2tbl || nullptr == l2tbl->table) { |
| 347 | return -EINVAL; |
| 348 | } |
| 349 | |
| 350 | memset(l2tbl->table, 0, |
| 351 | sizeof(struct l2_entry) * l2tbl->size * l2tbl->bucket); |
| 352 | |
| 353 | return 0; |
| 354 | } |
| 355 | |
| 356 | static uint64_t l2_addr_to_u64(char *addr) { |
| 357 | uint64_t a = *(reinterpret_cast<uint32_t *>(addr)); |
no outgoing calls
no test coverage detected