Home | History | Annotate | Download | only in updater

Lines Matching refs:buffer

123 static void allocate(size_t size, uint8_t** buffer, size_t* buffer_alloc) {
124 // if the buffer's big enough, reuse it.
127 free(*buffer);
129 *buffer = (uint8_t*) malloc(size);
130 if (*buffer == NULL) {
254 // The source range is loaded into the provided buffer, reallocating
259 uint8_t** buffer, size_t* buffer_alloc, int fd) {
270 allocate(src->size * BLOCKSIZE, buffer, buffer_alloc);
276 readblock(fd, *buffer+p, sz);
286 // locations given in *locs in the dest buffer. source and dest
287 // may be the same buffer.
312 // On return, buffer is filled with the loaded source data (rearranged
313 // and combined with stashed data as necessary). buffer may be
319 uint8_t** buffer, size_t* buffer_alloc, int fd,
331 allocate(*src_blocks * BLOCKSIZE, buffer, buffer_alloc);
344 readblock(fd, *buffer+p, sz);
356 MoveRange(*buffer, locs, *buffer);
368 MoveRange(*buffer, locs, stash_table[stash_id]);
506 buffer and add
559 uint8_t* buffer = NULL;
574 &buffer, &buffer_alloc, fd);
577 &buffer, &buffer_alloc, fd, stash_table);
586 writeblock(fd, buffer+p, sz);
615 allocate(BLOCKSIZE, &buffer, &buffer_alloc);
616 memset(buffer, 0, BLOCKSIZE);
620 writeblock(fd, buffer, BLOCKSIZE);
670 &buffer, &buffer_alloc, fd);
673 &buffer, &buffer_alloc, fd, stash_table);
691 ApplyImagePatch(buffer, src_blocks * BLOCKSIZE,
695 ApplyBSDiffPatch(buffer, src_blocks * BLOCKSIZE,
743 free(buffer);
780 uint8_t buffer[BLOCKSIZE];
789 readblock(fd, buffer, BLOCKSIZE);
790 SHA_update(&ctx, buffer, BLOCKSIZE);