Lines Matching full:blocks
42 char **blocks;
65 free(sm->blocks[i]);
66 free(sm->blocks);
67 sm->blocks = NULL;
106 sm->blocks = calloc(sm->blocks_count, sizeof(char*));
107 if (!sm->blocks) {
146 sm->blocks = calloc(params->blocks_count, sizeof(void*));
147 if (!sm->blocks) {
278 memcpy(buf + i * block_size, sm->blocks[start + i] , block_size);
279 free(sm->blocks[start + i]);
280 sm->blocks[start + i] = NULL;
284 sm->blocks[start] = buf;
286 retval = sparse_file_add_data(sm->sparse_file, sm->blocks[start],
299 int64_t chunk_start = (sm->blocks[0] == NULL) ? -1 : 0;
301 if (!sm->blocks[i] && chunk_start != -1) {
304 } else if (sm->blocks[i] && chunk_start == -1) {
383 if (sm->blocks[cur_block])
384 memcpy(out, (sm->blocks[cur_block]) + offset, count);
391 if (sm->blocks[cur_block])
393 sm->blocks[cur_block] + offset,
395 else if (sm->blocks)
424 if (!sm->blocks[cur_block]) {
425 sm->blocks[cur_block] = calloc(1, sm->block_size);
426 if (!sm->blocks[cur_block])
429 memcpy(sm->blocks[cur_block] + offset, in, count);
436 if (!sm->blocks[cur_block]) {
437 sm->blocks[cur_block] =
439 if (!sm->blocks[cur_block])
442 memcpy(sm->blocks[cur_block] + offset,
470 if (!sm->blocks[cur_block])
472 free(sm->blocks[cur_block]);
473 sm->blocks[cur_block] = NULL;