-C For\sthe\smulti-process\stester\son\sWin32,\smake\suse\sof\sthe\sGetCurrentProcessId\sAPI.
-D 2013-04-11T21:13:10.779
+C Expand\sscope\sof\sthe\sSQLITE_DISABLE_MMAP\sdefine\sfor\sthe\sWin32\sVFS.
+D 2013-04-11T22:52:44.089
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 3dd3fcb87b70c78d99b2c8a03e44ec86d6ca9ce2
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/os.h ae08bcc5f6ec6b339f4a2adf3931bb88cc14c3e4
F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04
F src/os_unix.c 5707fcb125f043e2d3376ea862e8ec83633c5e0e
-F src/os_win.c 426563476ac4b0939c1bb2a59c6330e6864db5b0
+F src/os_win.c 190be0e689be61b3dcb8c1d253bc967e09c1866e
F src/pager.c 28f45e60d9a173368872d6e688e7a848c3926344
F src/pager.h 5cb78b8e1adfd5451e600be7719f5a99d87ac3b1
F src/parse.y 5d5e12772845805fdfeb889163516b84fbb9ae95
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
-P dd3510bb20ade173c81c9874c05466011c8a249d
-R 69eb3039bde7025dc2da94e69ac2fbdc
+P f1b524b9d9ea3db96d54ac55c39f15e6879085bd
+R 81fda886c4b87168bc8522f21db6569f
+T *branch * winDisableMmap
+T *sym-winDisableMmap *
+T -sym-trunk *
U mistachkin
-Z 5b9c93ebe8aafa80e045145422e5fe06
+Z d00cd2eed7d26c94b83b76365b3988fe
winceLock local; /* Locks obtained by this instance of winFile */
winceLock *shared; /* Global shared lock memory for the file */
#endif
+#if !defined(SQLITE_DISABLE_MMAP)
int nFetchOut; /* Number of outstanding xFetch references */
HANDLE hMap; /* Handle for accessing memory mapping */
void *pMapRegion; /* Area memory mapped */
sqlite3_int64 mmapSize; /* Usable size of mapped region */
sqlite3_int64 mmapOrigsize; /* Actual size of mapped region */
sqlite3_int64 mmapLimit; /* Configured FCNTL_MMAP_LIMIT value */
+#endif
};
/*
OSTRACE(("CLOSE %d\n", pFile->h));
assert( pFile->h!=NULL && pFile->h!=INVALID_HANDLE_VALUE );
+#if !defined(SQLITE_DISABLE_MMAP)
rc = winUnmapfile(pFile);
if( rc!=SQLITE_OK ) return rc;
+#endif
do{
rc = osCloseHandle(pFile->h);
}
return SQLITE_OK;
}
+#if !defined(SQLITE_DISABLE_MMAP)
case SQLITE_FCNTL_MMAP_LIMIT: {
i64 newLimit = *(i64*)pArg;
*(i64*)pArg = pFile->mmapLimit;
if( newLimit>=0 ) pFile->mmapLimit = newLimit;
return SQLITE_OK;
}
+#endif
}
return SQLITE_NOTFOUND;
}
/*
** Cleans up the mapped region of the specified file, if any.
*/
+#if !defined(SQLITE_DISABLE_MMAP)
static int winUnmapfile(winFile *pFile){
assert( pFile!=0 );
-#if !defined(SQLITE_DISABLE_MMAP)
if( pFile->pMapRegion ){
if( !osUnmapViewOfFile(pFile->pMapRegion) ){
pFile->lastErrno = osGetLastError();
}
pFile->hMap = NULL;
}
-#endif
return SQLITE_OK;
}
-#if !defined(SQLITE_DISABLE_MMAP)
/*
** Memory map or remap the file opened by file-descriptor pFd (if the file
** is already mapped, the existing mapping is replaced by the new). Or, if
** release the reference by calling unixUnfetch().
*/
static int winFetch(sqlite3_file *fd, i64 iOff, int nAmt, void **pp){
+#if !defined(SQLITE_DISABLE_MMAP)
winFile *pFd = (winFile*)fd; /* The underlying database file */
+#endif
*pp = 0;
#if !defined(SQLITE_DISABLE_MMAP)
** may now be invalid and should be unmapped.
*/
static int winUnfetch(sqlite3_file *fd, i64 iOff, void *p){
+#if !defined(SQLITE_DISABLE_MMAP)
winFile *pFd = (winFile*)fd; /* The underlying database file */
/* If p==0 (unmap the entire file) then there must be no outstanding
}
assert( pFd->nFetchOut>=0 );
+#endif
return SQLITE_OK;
}
}
pFile->lastErrno = NO_ERROR;
pFile->zPath = zName;
+#if !defined(SQLITE_DISABLE_MMAP)
pFile->hMap = NULL;
pFile->pMapRegion = 0;
pFile->mmapSize = 0;
pFile->mmapOrigsize = 0;
pFile->mmapLimit = sqlite3GlobalConfig.mxMmap;
+#endif
OpenCounter(+1);
return rc;