1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Add calls to the BenignMalloc() functions around the SQLITE_FCNTL_SIZE_HINT call in pager.c.

FossilOrigin-Name: c17a3f5e5d72187c06b598ef071d43ef89328e19
This commit is contained in:
dan
2011-12-30 18:16:02 +00:00
parent 50cc5c2789
commit b3ce3d6d92
3 changed files with 10 additions and 8 deletions

View File

@@ -4029,7 +4029,9 @@ static int pager_write_pagelist(Pager *pPager, PgHdr *pList){
assert( rc!=SQLITE_OK || isOpen(pPager->fd) );
if( rc==SQLITE_OK && pPager->dbSize>pPager->dbHintSize ){
sqlite3_int64 szFile = pPager->pageSize * (sqlite3_int64)pPager->dbSize;
sqlite3BeginBenignMalloc();
sqlite3OsFileControl(pPager->fd, SQLITE_FCNTL_SIZE_HINT, &szFile);
sqlite3EndBenignMalloc();
pPager->dbHintSize = pPager->dbSize;
}