Slightly smaller and faster implementation of pcache1InitBulk().
FossilOrigin-Name: 06c2b685e15b3ee045a3e7ea018701392771c7664e59a51c9aba87cdefeb37af
This commit is contained in:
parent
9f549d548d
commit
4eb8d7fa89
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Fix\ssome\stests\sin\smalloc5.test\sto\saccount\sfor\sthe\ssqlite3_release_memory()\nchange\sin\sthe\sprevious\scommit.
|
||||
D 2017-03-29T16:55:23.235
|
||||
C Slightly\ssmaller\sand\sfaster\simplementation\sof\spcache1InitBulk().
|
||||
D 2017-03-29T17:06:14.960
|
||||
F Makefile.in 1cc758ce3374a32425e4d130c2fe7b026b20de5b8843243de75f087c0a2661fb
|
||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||
F Makefile.msc 1faf9f06aadc9284c212dea7bbc7c0dea7e8337f0287c81001eff500912c790a
|
||||
@ -393,7 +393,7 @@ F src/pager.h f2a99646c5533ffe11afa43e9e0bea74054e4efa
|
||||
F src/parse.y 48b03113704ee8bd78ee6996d81de7fbee22e105
|
||||
F src/pcache.c 62835bed959e2914edd26afadfecce29ece0e870
|
||||
F src/pcache.h 2cedcd8407eb23017d92790b112186886e179490
|
||||
F src/pcache1.c 7eaf916c98e8201aba67a907bbd122a1e476049156e1f507b00d4fd8b730eea7
|
||||
F src/pcache1.c 1195a21fe28e223e024f900b2011e80df53793f0356a24caace4188b098540dc
|
||||
F src/pragma.c 2b244434e76c7075edbcfd9e4d634899af0944ff01183b126d4671f7407c2368
|
||||
F src/pragma.h c9c763958fec92b04125571472c9500b351c5f7f
|
||||
F src/prepare.c b1140c3d0cf59bc85ace00ce363153041b424b7a
|
||||
@ -1569,7 +1569,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 5d902b7fea3144bf57f02aca87b9795fdcec4774310ade6ef01f37d206c3d74f
|
||||
R b34a64973f50dfefc35323bb58d30845
|
||||
U dan
|
||||
Z 6677e2c642118fa2c5f8a791ca8e31e4
|
||||
P d336858dfcfb9539c43582b1443911df825f9af7146957734bc6f01c8f4d98e3
|
||||
R 21af04338e0846af1da53b948e484a63
|
||||
U drh
|
||||
Z 526769a24dc035fa5d0eca71a01d1d0b
|
||||
|
@ -1 +1 @@
|
||||
d336858dfcfb9539c43582b1443911df825f9af7146957734bc6f01c8f4d98e3
|
||||
06c2b685e15b3ee045a3e7ea018701392771c7664e59a51c9aba87cdefeb37af
|
@ -285,8 +285,7 @@ static int pcache1InitBulk(PCache1 *pCache){
|
||||
sqlite3EndBenignMalloc();
|
||||
if( zBulk ){
|
||||
int nBulk = sqlite3MallocSize(zBulk)/pCache->szAlloc;
|
||||
int i;
|
||||
for(i=0; i<nBulk; i++){
|
||||
do{
|
||||
PgHdr1 *pX = (PgHdr1*)&zBulk[pCache->szPage];
|
||||
pX->page.pBuf = zBulk;
|
||||
pX->page.pExtra = &pX[1];
|
||||
@ -295,7 +294,7 @@ static int pcache1InitBulk(PCache1 *pCache){
|
||||
pX->pNext = pCache->pFree;
|
||||
pCache->pFree = pX;
|
||||
zBulk += pCache->szAlloc;
|
||||
}
|
||||
}while( --nBulk );
|
||||
}
|
||||
return pCache->pFree!=0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user