Logo Search packages:      
Sourcecode: chromium-browser version File versions  Download package

void* mmap ( void *  start,
size_t  length,
int  prot,
int  flags,
int  desc,
off_t  offset 

Maps a specified descriptor into the application address space.

start The requested start address for the mapping
length The number of bytes to be mapped (must be a multiple of 4K)
prot The protection
flags The modes the descriptor should be mapped under. The only allowed flags are MAP_FIXED, MAP_SHARED, MAP_PRIVATE and MAP_ANONYMOUS.
desc The descriptor to map
offset The offset within the file specified by desc.
On success, mmap returns the address the descriptor was mapped into. On failure it returns MAP_FAILED and sets errno appropriately.
Description of mmap. More details...

Definition at line 17 of file mmap.c.

References mmap().

Referenced by nacl::Map(), and mmap().

  void *retval = NACL_SYSCALL(mmap)(start, length, prot, flags, desc, offset);
  if ((uint32_t) retval > 0xffff0000u) {
     * __nacl_mmap returns an address as its value if it succeeds and
     * a negated errno value if it fails.  Differentiating between the
     * two requires testing that the address is not "valid", which we mean
     * to be is in (-4k, -1).
    errno = -(int) retval;
    return (void *) -1;
  return retval;

Generated by  Doxygen 1.6.0   Back to index