MCPcopy Create free account
hub / github.com/F-Stack/f-stack / moduleDefragGlobals

Function moduleDefragGlobals

app/redis-6.2.6/src/module.c:9223–9239  ·  view source on GitHub ↗

Call registered module API defrag functions */

Source from the content-addressed store, hash-verified

9221
9222/* Call registered module API defrag functions */
9223long moduleDefragGlobals(void) {
9224 dictIterator *di = dictGetIterator(modules);
9225 dictEntry *de;
9226 long defragged = 0;
9227
9228 while ((de = dictNext(di)) != NULL) {
9229 struct RedisModule *module = dictGetVal(de);
9230 if (!module->defrag_cb)
9231 continue;
9232 RedisModuleDefragCtx defrag_ctx = { 0, 0, NULL };
9233 module->defrag_cb(&defrag_ctx);
9234 defragged += defrag_ctx.defragged;
9235 }
9236 dictReleaseIterator(di);
9237
9238 return defragged;
9239}
9240
9241/* Register all the APIs we export. Keep this function at the end of the
9242 * file so that's easy to seek it to add new entries. */

Callers 1

defragOtherGlobalsFunction · 0.85

Calls 3

dictGetIteratorFunction · 0.70
dictNextFunction · 0.70
dictReleaseIteratorFunction · 0.70

Tested by

no test coverage detected