Revision 4118a970 linux-user/mmap.c
b/linux-user/mmap.c | ||
---|---|---|
224 | 224 |
start = HOST_PAGE_ALIGN(real_start); |
225 | 225 |
end = start + HOST_PAGE_ALIGN(len); |
226 | 226 |
if (start > real_start) |
227 |
munmap((void *)real_start, start - real_start);
|
|
227 |
munmap((void *)g2h(real_start), start - real_start);
|
|
228 | 228 |
if (end < real_end) |
229 |
munmap((void *)end, real_end - end);
|
|
229 |
munmap((void *)g2h(end), real_end - end);
|
|
230 | 230 |
/* use it as a fixed mapping */ |
231 | 231 |
flags |= MAP_FIXED; |
232 | 232 |
} else { |
... | ... | |
370 | 370 |
|
371 | 371 |
/* unmap what we can */ |
372 | 372 |
if (real_start < real_end) { |
373 |
ret = munmap((void *)real_start, real_end - real_start);
|
|
373 |
ret = munmap(g2h(real_start), real_end - real_start);
|
|
374 | 374 |
if (ret != 0) |
375 | 375 |
return ret; |
376 | 376 |
} |
Also available in: Unified diff