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

Function bioCreateLazyFreeJob

src/bio.cpp:139–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139void bioCreateLazyFreeJob(lazy_free_fn free_fn, int arg_count, ...) {
140 va_list valist;
141 /* Allocate memory for the job structure and all required
142 * arguments */
143 struct bio_job *job = (bio_job*)zmalloc(sizeof(*job) + sizeof(void *) * (arg_count));
144 job->free_fn = free_fn;
145
146 va_start(valist, arg_count);
147 for (int i = 0; i < arg_count; i++) {
148 job->set_free_arg(i, va_arg(valist, void *));
149 }
150 va_end(valist);
151 bioSubmitJob(BIO_LAZY_FREE, job);
152}
153
154void bioCreateCloseJob(int fd) {
155 struct bio_job *job = (bio_job*)zmalloc(sizeof(*job));

Callers 6

asyncDeleteMethod · 0.85
freeObjAsyncFunction · 0.85
emptyDbAsyncMethod · 0.85
freeSlotsToKeysMapAsyncFunction · 0.85
freeLuaScriptsAsyncFunction · 0.85

Calls 3

zmallocFunction · 0.85
bioSubmitJobFunction · 0.85
set_free_argMethod · 0.80

Tested by

no test coverage detected