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

Function sdsAllocSize

app/redis-6.2.6/src/sds.c:334–337  ·  view source on GitHub ↗

Return the total size of the allocation of the specified sds string, * including: * 1) The sds header before the pointer. * 2) The string. * 3) The free buffer at the end if any. * 4) The implicit null term. */

Source from the content-addressed store, hash-verified

332 * 4) The implicit null term.
333 */
334size_t sdsAllocSize(sds s) {
335 size_t alloc = sdsalloc(s);
336 return sdsHdrSize(s[-1])+alloc+1;
337}
338
339/* Return the pointer of the actual SDS allocation (normally SDS strings
340 * are referenced by the start of the string buffer). */

Callers 1

Calls 2

sdsallocFunction · 0.85
sdsHdrSizeFunction · 0.85

Tested by

no test coverage detected