Lines Matching refs:src_addr
128 void *src_addr = NULL; in get_source_mapping() local
138 src_addr = mmap((void *) addr, c.region_size, PROT_READ | PROT_WRITE, in get_source_mapping()
141 if (src_addr == MAP_FAILED) { in get_source_mapping()
154 if (((unsigned long long) src_addr & (c.src_alignment - 1)) || in get_source_mapping()
155 !((unsigned long long) src_addr & c.src_alignment)) { in get_source_mapping()
156 munmap(src_addr, c.region_size); in get_source_mapping()
160 if (!src_addr) in get_source_mapping()
163 return src_addr; in get_source_mapping()
174 void *addr, *src_addr, *dest_addr; in remap_region() local
185 src_addr = get_source_mapping(c); in remap_region()
186 if (!src_addr) { in remap_region()
194 memset((char *) src_addr + i, (char) rand(), 1); in remap_region()
200 addr = (void *) (((unsigned long long) src_addr + c.region_size in remap_region()
219 dest_addr = mremap(src_addr, c.region_size, c.region_size, in remap_region()
257 munmap(src_addr, c.region_size); in remap_region()