SQLite
Check-in [e3c63c31]
Not logged in
Overview
SHA1 Hash:e3c63c31a21b27806592d066a013a111b280c61f
Date: 2013-04-01 18:25:48
User: drh
Comment:Add a comment to xUnfetch on windows to say that the call to winUnmapfile() might be unnecessary.
Tags And Properties
Context
2013-04-01
22:38
[78141d0a] Add the SQLITE_CONFIG_MMAP_LIMIT configuration option for overriding the SQLITE_DEFAULT_MMAP_LIMIT compile-time setting. Enhance "PRAGMA mmap_limit" so that without a specific database name, it sets the limit on all database files and changes the default for any future databases that might be added using ATTACH. (user: drh, tags: experimental-mmap)
18:25
[e3c63c31] Add a comment to xUnfetch on windows to say that the call to winUnmapfile() might be unnecessary. (user: drh, tags: experimental-mmap)
18:15
[0e44ed1b] In windows, round down the size of the memory mapped region to the next smaller multiple of the page size. (user: drh, tags: experimental-mmap)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os_win.c.

3672
3673
3674
3675
3676
3677
3678




3679
3680
3681
3682
3683
3684
3685

  /* If p!=0, it must match the iOff value. */
  assert( p==0 || p==&((u8 *)pFd->pMapRegion)[iOff] );

  if( p ){
    pFd->nFetchOut--;
  }else{




    winUnmapfile(pFd);
  }

  assert( pFd->nFetchOut>=0 );
  return SQLITE_OK;
}








>
>
>
>







3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689

  /* If p!=0, it must match the iOff value. */
  assert( p==0 || p==&((u8 *)pFd->pMapRegion)[iOff] );

  if( p ){
    pFd->nFetchOut--;
  }else{
    /* FIXME:  If Windows truly always prevents truncating or deleting a
    ** file while a mapping is held, then the following winUnmapfile() call
    ** is unnecessary can can be omitted - potentially improving
    ** performance.  */
    winUnmapfile(pFd);
  }

  assert( pFd->nFetchOut>=0 );
  return SQLITE_OK;
}