Lines Matching defs:buf
41 static void mem_flush(unsigned char *buf, size_t buf_size)
43 unsigned char *cp = buf;
77 static int fill_one_span_read(unsigned char *buf, size_t buf_size)
79 unsigned char *end_ptr = buf + buf_size;
83 p = buf;
92 static void fill_one_span_write(unsigned char *buf, size_t buf_size)
94 unsigned char *end_ptr = buf + buf_size;
97 p = buf;
104 static int fill_cache_read(unsigned char *buf, size_t buf_size, bool once)
110 ret = fill_one_span_read(buf, buf_size);
127 static int fill_cache_write(unsigned char *buf, size_t buf_size, bool once)
130 fill_one_span_write(buf, buf_size);
140 unsigned char *buf;
143 buf = malloc_and_init_memory(buf_size);
144 if (!buf)
149 mem_flush(buf, buf_size);
152 ret = fill_cache_read(buf, buf_size, once);
154 ret = fill_cache_write(buf, buf_size, once);
156 free(buf);