Home | History | Annotate | Download | only in amalgamation

Lines Matching defs:lookaside

1938 ** memory allocation for the lookaside memory allocator on each
1940 ** size of each lookaside buffer slot and the second is the number of
1942 ** <i>default</i> lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE]
1943 ** verb to [sqlite3_db_config()] can be used to change the lookaside
2010 ** [lookaside memory allocator] configuration for the [database connection].
2012 ** pointer to a memory buffer to use for lookaside memory.
2015 ** lookaside buffer itself using [sqlite3_malloc()]. ^The second argument is the
2016 ** size of each lookaside buffer slot. ^The third argument is the number of
2021 ** rounded down to the next smaller multiple of 8. ^(The lookaside memory
2023 ** connection is not currently using lookaside memory, or in other words
2026 ** Any attempt to change the lookaside memory configuration when lookaside
6124 ** <dd>This parameter returns the number of lookaside memory slots currently
6129 ** satisfied using lookaside memory. Only the high-water value is meaningful;
6134 ** been satisfied using lookaside memory but failed due to the amount of
6135 ** memory requested being larger than the lookaside slot size.
6141 ** been satisfied using lookaside memory but failed due to all lookaside
6162 ** and lookaside memory used by all prepared statements associated with
7597 typedef struct Lookaside Lookaside;
9075 ** Lookaside malloc is a set of fixed-size buffers that can be used
9078 ** lookaside malloc provides a significant performance enhancement
9082 ** The Lookaside structure holds configuration information about the
9083 ** lookaside malloc subsystem. Each available memory allocation in
9084 ** the lookaside subsystem is stored on a linked list of LookasideSlot
9087 ** Lookaside allocations are only allowed for objects that are associated
9089 ** be stored in lookaside because in shared cache mode the schema information
9091 ** schema information, the Lookaside.bEnabled flag is cleared so that
9092 ** lookaside allocations are not used to construct the schema objects.
9094 struct Lookaside {
9096 u8 bEnabled; /* False to disable new lookaside allocations */
9204 Lookaside lookaside; /* Lookaside malloc configuration */
10737 sqlite3 *db; /* Optional database for lookaside. Can be NULL */
10769 int szLookaside; /* Default lookaside buffer size */
10770 int nLookaside; /* Default lookaside buffer count */
11556 ** it might have been allocated by lookaside, except the allocation was
11557 ** too large or lookaside was already full. It is important to verify
11558 ** that allocations that might have been satisfied by lookaside are not
11559 ** passed back to non-lookaside free() routines. Asserts such as the
11560 ** example above are placed on the non-lookaside free() routines to verify
11576 #define MEMTYPE_LOOKASIDE 0x02 /* Might have been lookaside memory */
12733 *pCurrent = db->lookaside.nOut;
12734 *pHighwater = db->lookaside.mxOut;
12736 db->lookaside.mxOut = db->lookaside.nOut;
12750 *pHighwater = db->lookaside.anStat[op - SQLITE_DBSTATUS_LOOKASIDE_HIT];
12752 db->lookaside.anStat[op - SQLITE_DBSTATUS_LOOKASIDE_HIT] = 0;
18136 ** TRUE if p is a lookaside memory allocation from db
18140 return p && p>=db->lookaside.pStart && p<db->lookaside.pEnd;
18158 return db->lookaside.sz;
18198 pBuf->pNext = db->lookaside.pFree;
18199 db->lookaside.pFree = pBuf;
18200 db->lookaside.nOut--;
18324 if( db->lookaside
18325 if( n>db->lookaside.sz ){
18326 db->lookaside.anStat[1]++;
18327 }else if( (pBuf = db->lookaside.pFree)==0 ){
18328 db->lookaside.anStat[2]++;
18330 db->lookaside.pFree = pBuf->pNext;
18331 db->lookaside.nOut++;
18332 db->lookaside.anStat[0]++;
18333 if( db->lookaside.nOut>db->lookaside.mxOut ){
18334 db->lookaside.mxOut = db->lookaside.nOut;
18350 ((db && db->lookaside.bEnabled) ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP));
18367 if( n<=db->lookaside.sz ){
18372 memcpy(pNew, p, db->lookaside.sz);
18385 (db->lookaside.bEnabled ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP));
78636 u8 enableLookaside = db->lookaside.bEnabled;
78640 db->lookaside.bEnabled = 0;
78649 db->lookaside.bEnabled = enableLookaside;
83884 ** the lookaside buffer belonging to database handle dbMem.
84247 u8 enableLookaside; /* Copy of db->lookaside.bEnabled */
84355 /* Disable lookaside memory allocation */
84356 enableLookaside = db->lookaside.bEnabled;
84357 db->lookaside.bEnabled = 0;
84379 /* Re-enable the lookaside buffer, if it was disabled earlier. */
84380 db->lookaside.bEnabled = enableLookaside;
91286 /* The sqlite3ResultSetOfSelect() is only used n contexts where lookaside
91288 assert( db->lookaside.bEnabled==0 );
104771 pParse->db->lookaside.bEnabled = 0;
105751 pParse->db->lookaside.bEnabled = 0;
106737 u8 enableLookaside; /* Saved value of db->lookaside.bEnabled */
106761 enableLookaside = db->lookaside.bEnabled;
106762 if( db->lookaside.pStart ) db->lookaside.bEnabled = 1;
106816 db->lookaside.bEnabled = enableLookaside;
107684 ** Set up the lookaside buffers for a database connection.
107686 ** If lookaside is already active, return SQLITE_BUSY.
107688 ** The sz parameter is the number of bytes in each lookaside slot.
107690 ** space for the lookaside memory is obtained from sqlite3_malloc().
107692 ** the lookaside memory.
107696 if( db->lookaside.nOut ){
107699 /* Free any existing lookaside buffer for this handle before
107703 if( db->lookaside.bMalloced ){
107704 sqlite3_free(db->lookaside.pStart);
107706 /* The size of a lookaside slot needs to be larger than a pointer
107723 db->lookaside.pStart = pStart;
107724 db->lookaside.pFree = 0;
107725 db->lookaside.sz = (u16)sz;
107732 p->pNext = db->lookaside.pFree;
107733 db->lookaside.pFree = p;
107736 db->lookaside.pEnd = p;
107737 db->lookaside.bEnabled = 1;
107738 db->lookaside.bMalloced = pBuf==0 ?1:0;
107740 db->lookaside.pEnd = 0;
107741 db->lookaside.bEnabled = 0;
107742 db->lookaside.bMalloced = 0;
108040 assert( db->lookaside.nOut==0 ); /* Fails on a lookaside memory leak */
108041 if( db->lookaside.bMalloced ){
108042 sqlite3_free(db->lookaside.pStart);
109268 /* Enable the lookaside-malloc subsystem */