mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-20 11:56:23 +03:00
Fallback to unbuffered printing if OOM
This commit is contained in:
parent
cd6e908241
commit
f81341a48b
4 changed files with 39 additions and 21 deletions
|
|
@ -23,7 +23,9 @@ buf_write_init(buf_write_arg_t *arg, void (*write_cb)(void *, const char *),
|
|||
void *cbopaque, char *buf, size_t buf_len) {
|
||||
arg->write_cb = write_cb;
|
||||
arg->cbopaque = cbopaque;
|
||||
assert(buf != NULL);
|
||||
arg->buf = buf;
|
||||
assert(buf_len >= 2);
|
||||
arg->buf_size = buf_len - 1; /* Accommodating '\0' at the end. */
|
||||
arg->buf_end = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue