diff options
author | drh <drh@noemail.net> | 2018-10-11 02:39:11 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2018-10-11 02:39:11 +0000 |
commit | b6c4d59e89f667838cf0d4500d36e3542253dc85 (patch) | |
tree | 4690279454d0fdae31d2b4b7d2c2e2ebccfdd115 /src/os_unix.c | |
parent | a9e4be3b08123dcb20d506f3c4429e4f25961498 (diff) | |
download | sqlite-b6c4d59e89f667838cf0d4500d36e3542253dc85.tar.gz sqlite-b6c4d59e89f667838cf0d4500d36e3542253dc85.zip |
In the unix VFS, fix the heap shm allocator (used for unix-excl)
so that it works even on systems where the page size is larger than 32KB.
FossilOrigin-Name: 7fbb083c5cf0948af3624b7538ffa086f77de27a3e84a7039ae7d6574f1a3a54
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 55f220ea9..4228aaaf0 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -4734,12 +4734,12 @@ static int unixShmMap( goto shmpage_out; } }else{ - pMem = sqlite3_malloc64(szRegion); + pMem = sqlite3_malloc64(nMap); if( pMem==0 ){ rc = SQLITE_NOMEM_BKPT; goto shmpage_out; } - memset(pMem, 0, szRegion); + memset(pMem, 0, nMap); } for(i=0; i<nShmPerMap; i++){ |