Lines Matching refs:size
422 void *grab_file(const char *filename, unsigned long *size) in grab_file() argument
434 *size = st.st_size; in grab_file()
435 map = mmap(NULL, *size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0); in grab_file()
449 char *get_next_line(unsigned long *pos, void *file, unsigned long size) in get_next_line() argument
457 for (; *pos < size ; (*pos)++) { in get_next_line()
463 if (*p != '\n' && (*pos < size)) { in get_next_line()
478 void release_file(void *file, unsigned long size) in release_file() argument
480 munmap(file, size); in release_file()
492 hdr = grab_file(filename, &info->size); in parse_elf()
503 if (info->size < sizeof(*hdr)) { in parse_elf()
533 if (hdr->e_shoff > info->size) { in parse_elf()
536 filename, info->size); in parse_elf()
576 if (!nobits && sechdrs[i].sh_offset > info->size) { in parse_elf()
653 release_file(info->hdr, info->size); in parse_elf_finish()
801 unsigned long size = info->modinfo_len; in get_next_modinfo() local
804 size -= prev - modinfo; in get_next_modinfo()
805 modinfo = next_string(prev, &size); in get_next_modinfo()
808 for (p = modinfo; p; p = next_string(p, &size)) { in get_next_modinfo()
2151 if (buf->size - buf->pos < len) { in buf_write()
2152 buf->size += len + SZ; in buf_write()
2153 buf->p = NOFAIL(realloc(buf->p, buf->size)); in buf_write()
2448 unsigned long size, pos = 0; in read_dump() local
2449 void *file = grab_file(fname, &size); in read_dump()
2456 while ((line = get_next_line(&pos, file, size))) { in read_dump()
2492 release_file(file, size); in read_dump()
2495 release_file(file, size); in read_dump()