cpp/src/plasma/client.cc
// If the file descriptor fd has been mmapped in this client process before,
// return the pointer that was returned by mmap, otherwise mmap it and store the
// pointer in a hash table.
If the file descriptor fd has been mmapped in this client process before,
return the pointer that was returned by mmap, otherwise mmap it and store the
pointer in a hash table.
If the file descriptor fd has been mmapped in this client process before return the pointer that was returned by mmap otherwise mmap it and store the pointer in a hash table .
uint8_t* PlasmaClient::Impl::LookupOrMmap(int fd, int store_fd_val, int64_t map_size) {
  auto entry = mmap_table_.find(store_fd_val);
  if (entry != mmap_table_.end()) {
    return entry->second->pointer();
  } else {
    mmap_table_[store_fd_val] =
        std::unique_ptr<ClientMmapTableEntry>(new ClientMmapTableEntry(fd, map_size));
    return mmap_table_[store_fd_val]->pointer();
  }
}
uint8_t * PlasmaClient :: Impl :: LookupOrMmap ( int fd , int store_fd_val , int64_t map_size ) { auto entry = mmap_table_ . find ( store_fd_val ) ; if ( entry != mmap_table_ . end ( ) ) { return entry -> second -> pointer ( ) ; } else { mmap_table_ [ store_fd_val ] = std :: unique_ptr < ClientMmapTableEntry > ( new ClientMmapTableEntry ( fd , map_size ) ) ; return mmap_table_ [ store_fd_val ] -> pointer ( ) ; } }
If the file descriptor fd has been mmapped in this client process before,
return the pointer that was returned by mmap, otherwise mmap it and store the
pointer in a hash table.
If the file descriptor fd has been mmapped in this client process before return the pointer that was returned by mmap otherwise mmap it and store the pointer in a hash table .