1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

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
This commit is contained in:
drh
2015-07-04 18:15:04 +00:00
parent 70c8885417
commit 01c5c00c12
4 changed files with 45 additions and 11 deletions

View File

@@ -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));