1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

When SQLITE_OMIT_LOOKASIDE is set, do not allocate any lookaside memory since

it will never be used.

FossilOrigin-Name: 0ffd499f2374f2b191080b9952acfed56daf3335
This commit is contained in:
drh
2015-07-23 17:16:27 +00:00
parent d3e3f0b46e
commit 7877d9afca
3 changed files with 9 additions and 7 deletions

View File

@@ -642,6 +642,7 @@ int sqlite3_config(int op, ...){
** the lookaside memory.
*/
static int setupLookaside(sqlite3 *db, void *pBuf, int sz, int cnt){
#ifndef SQLITE_OMIT_LOOKASIDE
void *pStart;
if( db->lookaside.nOut ){
return SQLITE_BUSY;
@@ -692,6 +693,7 @@ static int setupLookaside(sqlite3 *db, void *pBuf, int sz, int cnt){
db->lookaside.bEnabled = 0;
db->lookaside.bMalloced = 0;
}
#endif /* SQLITE_OMIT_LOOKASIDE */
return SQLITE_OK;
}