diff options
author | drh <drh@noemail.net> | 2010-09-02 14:00:19 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2010-09-02 14:00:19 +0000 |
commit | 37e8b5b2cc0845accf38d1e0ef798cad6ad227b3 (patch) | |
tree | 504959c95e5dee683386b702a03b54384352700f /src/os_unix.c | |
parent | 4336cc45c5c82ba91e2aaef038047bb6e44a3b92 (diff) | |
download | sqlite-37e8b5b2cc0845accf38d1e0ef798cad6ad227b3.tar.gz sqlite-37e8b5b2cc0845accf38d1e0ef798cad6ad227b3.zip |
Fix the computation of the offset on the mmap() for the Nth shared memory
region. Because of the way shared memory is accessed, the old computation,
though wrong, still happened to always get the right answer. Nevertheless,
it is good to do the computation correctly.
FossilOrigin-Name: 36397f62f2e3a62b4d5730b29c197449c6850cac
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index e3ea4f222..e0b61f978 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -3559,7 +3559,7 @@ static int unixShmMap( pShmNode->apRegion = apNew; while(pShmNode->nRegion<=iRegion){ void *pMem = mmap(0, szRegion, PROT_READ|PROT_WRITE, - MAP_SHARED, pShmNode->h, iRegion*szRegion + MAP_SHARED, pShmNode->h, pShmNode->nRegion*szRegion ); if( pMem==MAP_FAILED ){ rc = SQLITE_IOERR; |