Changeset View
Changeset View
Standalone View
Standalone View
head/contrib/jemalloc/src/malloc_io.c
Show First 20 Lines • Show All 640 Lines • ▼ Show 20 Lines | malloc_vcprintf(void (*write_cb)(void *, const char *), void *cbopaque, | ||||
if (write_cb == NULL) { | if (write_cb == NULL) { | ||||
/* | /* | ||||
* The caller did not provide an alternate write_cb callback | * The caller did not provide an alternate write_cb callback | ||||
* function, so use the default one. malloc_write() is an | * function, so use the default one. malloc_write() is an | ||||
* inline function, so use malloc_message() directly here. | * inline function, so use malloc_message() directly here. | ||||
*/ | */ | ||||
write_cb = (je_malloc_message != NULL) ? je_malloc_message : | write_cb = (je_malloc_message != NULL) ? je_malloc_message : | ||||
wrtmessage; | wrtmessage; | ||||
cbopaque = NULL; | |||||
} | } | ||||
malloc_vsnprintf(buf, sizeof(buf), format, ap); | malloc_vsnprintf(buf, sizeof(buf), format, ap); | ||||
write_cb(cbopaque, buf); | write_cb(cbopaque, buf); | ||||
} | } | ||||
/* | /* | ||||
* Print to a callback function in such a way as to (hopefully) avoid memory | * Print to a callback function in such a way as to (hopefully) avoid memory | ||||
Show All 33 Lines |