Lines Matching refs:filled

56         assert(imp->offset <= imp->filled);  in get_line()
57 assert(imp->filled <= MALLOC_SIZEOF_SAFE(imp->buf)); in get_line()
65 imp->filled - start); in get_line()
70 imp->scanned = imp->filled; in get_line()
83 if (MALLOC_SIZEOF_SAFE(imp->buf) - imp->filled < LINE_CHUNK && in get_line()
84 !realloc_buffer(imp, MIN(imp->filled + LINE_CHUNK, ENTRY_SIZE_MAX))) in get_line()
88 assert(MALLOC_SIZEOF_SAFE(imp->buf) - imp->filled >= LINE_CHUNK || in get_line()
92 imp->buf + imp->filled, in get_line()
93 MALLOC_SIZEOF_SAFE(imp->buf) - imp->filled); in get_line()
98 MALLOC_SIZEOF_SAFE(imp->buf) - imp->filled); in get_line()
103 imp->filled += n; in get_line()
118 assert(imp->offset <= imp->filled); in fill_fixed_size()
119 assert(imp->filled <= MALLOC_SIZEOF_SAFE(imp->buf)); in fill_fixed_size()
123 while (imp->filled - imp->offset < size) { in fill_fixed_size()
133 n = read(imp->fd, imp->buf + imp->filled, in fill_fixed_size()
134 MALLOC_SIZEOF_SAFE(imp->buf) - imp->filled); in fill_fixed_size()
138 MALLOC_SIZEOF_SAFE(imp->buf) - imp->filled); in fill_fixed_size()
143 imp->filled += n; in fill_fixed_size()
428 if (!realloc_buffer(imp, imp->filled + size)) in journal_importer_push_data()
432 size, MALLOC_SIZEOF_SAFE(imp->buf), imp->filled, in journal_importer_push_data()
435 memcpy(imp->buf + imp->filled, data, size); in journal_importer_push_data()
436 imp->filled += size; in journal_importer_push_data()
449 remain = imp->filled - imp->offset; in journal_importer_drop_iovw()
452 imp->offset = imp->scanned = imp->filled = 0; in journal_importer_drop_iovw()
453 else if (imp->offset > MALLOC_SIZEOF_SAFE(imp->buf) - imp->filled && in journal_importer_drop_iovw()
457 imp->filled = remain; in journal_importer_drop_iovw()
461 while (target > 16 * LINE_CHUNK && imp->filled < target / 2) in journal_importer_drop_iovw()