* mmap.cc (map_map): Add debug output.

(mmap64): Evaluate gran_len correctly even if offset isn't 0.
This commit is contained in:
Corinna Vinschen 2002-09-24 13:48:07 +00:00
parent 1878ede072
commit 6b579509ea
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2002-09-24 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (map_map): Add debug output.
(mmap64): Evaluate gran_len correctly even if offset isn't 0.
2002-09-22 Christopher Faylor <cgf@redhat.com> 2002-09-22 Christopher Faylor <cgf@redhat.com>
More GNUify non-GNU formatted functions calls throughout. More GNUify non-GNU formatted functions calls throughout.

View File

@ -140,6 +140,7 @@ mmap_record::map_map (__off64_t off, DWORD len)
break; break;
} }
debug_printf ("map_map (fd=%d, off=%D, len=%d)", fdesc_, off, len);
len = PAGE_CNT (len); len = PAGE_CNT (len);
if (fdesc_ == -1 && !off) if (fdesc_ == -1 && !off)
{ {
@ -468,7 +469,7 @@ mmap64 (caddr_t addr, size_t len, int prot, int flags, int fd, __off64_t off)
/* Map always in multipliers of `granularity'-sized chunks. */ /* Map always in multipliers of `granularity'-sized chunks. */
__off64_t gran_off = off & ~(granularity - 1); __off64_t gran_off = off & ~(granularity - 1);
DWORD gran_len = howmany (len, granularity) * granularity; DWORD gran_len = howmany (off + len, granularity) * granularity - gran_off;
fhandler_base *fh; fhandler_base *fh;
caddr_t base = addr; caddr_t base = addr;