1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Make SQLITE_CONFIG_PCACHE_HDRSZ accurate (not an over-estimate) on 32-bit

systems.

FossilOrigin-Name: 340b347758e570db3e739b56af0dcf3fc34525be
This commit is contained in:
drh
2014-12-30 13:04:25 +00:00
parent 8ab4b9e964
commit 51dc84eb70
4 changed files with 12 additions and 11 deletions

View File

@@ -196,7 +196,8 @@ int sqlite3PcacheSetPageSize(PCache *pCache, int szPage){
if( pCache->szPage ){
sqlite3_pcache *pNew;
pNew = sqlite3GlobalConfig.pcache2.xCreate(
szPage, pCache->szExtra + sizeof(PgHdr), pCache->bPurgeable
szPage, pCache->szExtra + ROUND8(sizeof(PgHdr)),
pCache->bPurgeable
);
if( pNew==0 ) return SQLITE_NOMEM;
sqlite3GlobalConfig.pcache2.xCachesize(pNew, numberOfCachePages(pCache));