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

Function defragRaxNode

src/defrag.cpp:656–663  ·  view source on GitHub ↗

Defrag callback for radix tree iterator, called for each node, * used in order to defrag the nodes allocations. */

Source from the content-addressed store, hash-verified

654/* Defrag callback for radix tree iterator, called for each node,
655 * used in order to defrag the nodes allocations. */
656int defragRaxNode(raxNode **noderef) {
657 raxNode *newnode = (raxNode*)activeDefragAlloc(*noderef);
658 if (newnode) {
659 *noderef = newnode;
660 return 1;
661 }
662 return 0;
663}
664
665/* returns 0 if no more work needs to be been done, and 1 if time is up and more work is needed. */
666int scanLaterStreamListpacks(robj *ob, unsigned long *cursor, long long endtime, long long *defragged) {

Callers 2

scanLaterStreamListpacksFunction · 0.85
defragRadixTreeFunction · 0.85

Calls 1

activeDefragAllocFunction · 0.85

Tested by

no test coverage detected