File: mmap_info.h

package info (click to toggle)
glibc 2.36-9%2Bdeb12u12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 299,992 kB
  • sloc: ansic: 1,055,666; asm: 324,942; makefile: 15,198; python: 12,603; sh: 10,884; cpp: 5,685; awk: 1,883; perl: 518; yacc: 292; pascal: 182; sed: 39
file content (13 lines) | stat: -rw-r--r-- 425 bytes parent folder | download | duplicates (21)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* mips64n32 uses __NR_mmap for mmap64 while still having sizeof (off_t)
   smaller than sizeof (off64_t).  So it allows mapping large offsets
   using mmap64 than 32-bit archs which uses __NR_mmap2.  */

static inline uint64_t
mmap64_maximum_offset (long int page_shift)
{
#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
  return UINT64_MAX;
#else
  return (UINT64_C(1) << (page_shift + (8 * sizeof (off_t)))) - 1;
#endif
}