Lines Matching defs:prof_buf
455 struct prof_buf {
461 static void add_data_to_buffer(struct prof_buf *b, const void *d, size_t len)
484 add_data_to_buffer((struct prof_buf *)data, str, strlen(str));
490 struct prof_buf prof_buf = { 0, 0, 0, 0 };
492 dump_profile(root, 0, dump_profile_to_buffer_cb, &prof_buf);
493 if (prof_buf.err) {
497 add_data_to_buffer(&prof_buf, "", 1); /* append nul */
498 if (prof_buf.max - prof_buf.cur > (prof_buf.max >> 3)) {
499 char *newptr = realloc(prof_buf.base, prof_buf.cur);
501 prof_buf.base = newptr;
503 *buf = prof_buf.base;