Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Unified Diff: third_party/sqlite/src/src/mem5.c

Issue 5626002: Update sqlite to 3.7.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/third_party/sqlite/src
Patch Set: Remove misc change. Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/src/mem3.c ('k') | third_party/sqlite/src/src/memjournal.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/src/mem5.c
diff --git a/third_party/sqlite/src/src/mem5.c b/third_party/sqlite/src/src/mem5.c
index 3fe04e24552cd4d5724e7398d9547fc1fe7a218f..2fdfac141358a359b33a245576f8f70b10533132 100644
--- a/third_party/sqlite/src/src/mem5.c
+++ b/third_party/sqlite/src/src/mem5.c
@@ -268,7 +268,11 @@ static void *memsys5MallocUnsafe(int nByte){
** two in order to create a new free block of size iLogsize.
*/
for(iBin=iLogsize; mem5.aiFreelist[iBin]<0 && iBin<=LOGMAX; iBin++){}
- if( iBin>LOGMAX ) return 0;
+ if( iBin>LOGMAX ){
+ testcase( sqlite3GlobalConfig.xLog!=0 );
+ sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes", nByte);
+ return 0;
+ }
i = memsys5UnlinkFirst(iBin);
while( iBin>iLogsize ){
int newSize;
@@ -391,7 +395,7 @@ static void *memsys5Realloc(void *pPrior, int nBytes){
int nOld;
void *p;
assert( pPrior!=0 );
- assert( (nBytes&(nBytes-1))==0 );
+ assert( (nBytes&(nBytes-1))==0 ); /* EV: R-46199-30249 */
assert( nBytes>=0 );
if( nBytes==0 ){
return 0;
« no previous file with comments | « third_party/sqlite/src/src/mem3.c ('k') | third_party/sqlite/src/src/memjournal.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698