aboutsummaryrefslogtreecommitdiff
path: root/src/malloc.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-07-04 18:15:04 +0000
committerdrh <drh@noemail.net>2015-07-04 18:15:04 +0000
commit01c5c00c1299dd4c7933cc3df231c04183aedc47 (patch)
tree8fa614433b6e6bc39082338b6da7bee4afb2737a /src/malloc.c
parent70c8885417dfaba63df287ffa4ff23ec0170a026 (diff)
downloadsqlite-01c5c00c1299dd4c7933cc3df231c04183aedc47.tar.gz
sqlite-01c5c00c1299dd4c7933cc3df231c04183aedc47.zip
Preserve the number of requested PAGECACHE pages even if the memory pointer
or size is zero. Enhance the pcache1.c header comment to explain the memory layout of a page cache line. FossilOrigin-Name: dacb2a615ce1c0573baf4518000454038745cf2a
Diffstat (limited to 'src/malloc.c')
-rw-r--r--src/malloc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/malloc.c b/src/malloc.c
index 97b9cd577..1e77734ec 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -193,10 +193,9 @@ int sqlite3MallocInit(void){
sqlite3GlobalConfig.nScratch = 0;
}
if( sqlite3GlobalConfig.pPage==0 || sqlite3GlobalConfig.szPage<512
- || sqlite3GlobalConfig.nPage<1 ){
+ || sqlite3GlobalConfig.nPage<=0 ){
sqlite3GlobalConfig.pPage = 0;
sqlite3GlobalConfig.szPage = 0;
- sqlite3GlobalConfig.nPage = 0;
}
rc = sqlite3GlobalConfig.m.xInit(sqlite3GlobalConfig.m.pAppData);
if( rc!=SQLITE_OK ) memset(&mem0, 0, sizeof(mem0));