Lines Matching defs:offset
47 uint64_t offset;
161 _pure_ static bool window_matches(Window *w, int fd, int prot, uint64_t offset, size_t size) {
170 offset >= w->offset &&
171 offset + size <= w->offset + w->size;
174 static Window *window_add(MMapCache *m, FileDescriptor *fd, int prot, bool keep_always, uint64_t offset, size_t size, void *ptr) {
199 w->offset = offset;
387 uint64_t offset,
408 if (!window_matches(c->window, fd, prot, offset, size)) {
420 *ret = (uint8_t*) c->window->ptr + (offset - c->window->offset);
430 uint64_t offset,
453 if (window_matches(w, fd, prot, offset, size))
466 *ret = (uint8_t*) w->ptr + (offset - w->offset);
470 static int mmap_try_harder(MMapCache *m, void *addr, int fd, int prot, int flags, uint64_t offset, size_t size, void **res) {
480 ptr = mmap(addr, size, prot, flags, fd, offset);
503 uint64_t offset,
521 woffset = offset & ~((uint64_t) page_size() - 1ULL);
522 wsize = size + (offset - woffset);
530 if (delta > offset)
570 *ret = (uint8_t*) w->ptr + (offset - w->offset);
584 uint64_t offset,
599 r = try_context(m, fd, prot, context, keep_always, offset, size, ret);
606 r = find_mmap(m, fd, prot, context, keep_always, offset, size, ret);
615 return add_mmap(m, fd, prot, context, keep_always, offset, size, st, ret);