Lines Matching refs:write_buffer
81 static char *write_buffer = NULL;
120 write_buffer = realloc(write_buffer, size);
126 memcpy(&write_buffer[cur_pos], s, len);
155 val = *(uint32_t*)&write_buffer[cur_pos];
166 val = *(uint64_t*)&write_buffer[cur_pos];
224 write_buffer = mmap(0, file_size, PROT_READ | PROT_WRITE,
226 if (write_buffer == (void *)-1) {
236 if (msync(write_buffer, file_size, MS_SYNC) == -1) {
245 (void)munmap(write_buffer, file_size);
246 write_buffer = NULL;
294 write_buffer = NULL;
300 memset(write_buffer, 0, WRITE_BUFFER_SIZE);
305 write_buffer = NULL;
308 memset(write_buffer, 0, WRITE_BUFFER_SIZE);
483 fwrite(write_buffer, cur_pos, 1, output_file);
484 free(write_buffer);
492 write_buffer = NULL;