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

Function poolAllocRelease

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

Release the chain of blocks used for pool allocations. */

Source from the content-addressed store, hash-verified

466
467/* Release the chain of blocks used for pool allocations. */
468void poolAllocRelease(RedisModuleCtx *ctx) {
469 RedisModulePoolAllocBlock *head = ctx->pa_head, *next;
470
471 while(head != NULL) {
472 next = head->next;
473 zfree(head);
474 head = next;
475 }
476 ctx->pa_head = NULL;
477}
478
479/* Return heap allocated memory that will be freed automatically when the
480 * module callback function returns. Mostly suitable for small allocations

Callers 1

moduleFreeContextFunction · 0.85

Calls 1

zfreeFunction · 0.70

Tested by

no test coverage detected