MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / extent_can_coalesce

Function extent_can_coalesce

deps/jemalloc/src/extent.c:1559–1577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1557}
1558
1559static bool
1560extent_can_coalesce(arena_t *arena, extents_t *extents, const extent_t *inner,
1561 const extent_t *outer) {
1562 assert(extent_arena_get(inner) == arena);
1563 if (extent_arena_get(outer) != arena) {
1564 return false;
1565 }
1566
1567 assert(extent_state_get(inner) == extent_state_active);
1568 if (extent_state_get(outer) != extents->state) {
1569 return false;
1570 }
1571
1572 if (extent_committed_get(inner) != extent_committed_get(outer)) {
1573 return false;
1574 }
1575
1576 return true;
1577}
1578
1579static bool
1580extent_coalesce(tsdn_t *tsdn, arena_t *arena, extent_hooks_t **r_extent_hooks,

Callers 2

extent_coalesceFunction · 0.70
extent_try_coalesce_implFunction · 0.70

Calls 3

extent_arena_getFunction · 0.50
extent_state_getFunction · 0.50
extent_committed_getFunction · 0.50

Tested by

no test coverage detected