Lines Matching refs:sqlite3GlobalConfig

7838   #define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config)
7844 #define sqlite3GlobalConfig sqlite3Config
13151 nByte += sqlite3GlobalConfig.m.xRoundup(sizeof(HashElem)) * (
13629 ** If the sqlite3GlobalConfig.bLocaltimeFault variable is true then this
13643 if( sqlite3GlobalConfig.bLocaltimeFault ) pX = 0;
13650 if( sqlite3GlobalConfig.bLocaltimeFault ) return 1;
14799 ** sqlite3GlobalConfig.m with pointers to the routines in this file.
14863 testcase( sqlite3GlobalConfig.xLog!=0 );
14916 testcase( sqlite3GlobalConfig.xLog!=0 );
14951 ** sqlite3GlobalConfig.m with pointers to the routines in this file.
15160 if( !sqlite3GlobalConfig.bMemstat ){
15274 assert( sqlite3GlobalConfig.bMemstat || sqlite3GlobalConfig.bCoreMutex==0
15331 ** sqlite3GlobalConfig.m with pointers to the routines in this file.
15351 if( p && sqlite3GlobalConfig.m.xMalloc==sqlite3MemMalloc ){
15370 if( p && sqlite3GlobalConfig.m.xMalloc==sqlite3MemMalloc ){
15392 if( p && sqlite3GlobalConfig.m.xMalloc==sqlite3MemMalloc ){
15719 ** sqlite3GlobalConfig.bMemStat is true.
15722 if( sqlite3GlobalConfig.bMemstat==0 && mem3.mutex==0 ){
16053 if( !sqlite3GlobalConfig.pHeap ){
16059 mem3.aPool = (Mem3Block *)sqlite3GlobalConfig.pHeap;
16060 mem3.nPool = (sqlite3GlobalConfig.nHeap / sizeof(Mem3Block)) - 2;
16166 ** sqlite3GlobalConfig.m with pointers to the routines in this file. The
16376 ** sqlite3GlobalConfig.bMemStat is true.
16460 testcase( sqlite3GlobalConfig.xLog!=0 );
16660 nByte = sqlite3GlobalConfig.nHeap;
16661 zByte = (u8*)sqlite3GlobalConfig.pHeap;
16664 /* boundaries on sqlite3GlobalConfig.mnReq are enforced in sqlite3_config() */
16665 nMinLog = memsys5Log(sqlite3GlobalConfig.mnReq);
16691 if( sqlite3GlobalConfig.bMemstat==0 ){
16805 if( !sqlite3GlobalConfig.mutex.xMutexAlloc ){
16809 ** the default implementation into the sqlite3GlobalConfig structure.
16812 sqlite3_mutex_methods *pTo = &sqlite3GlobalConfig.mutex;
16814 if( sqlite3GlobalConfig.bCoreMutex ){
16824 rc = sqlite3GlobalConfig.mutex.xMutexInit();
16839 if( sqlite3GlobalConfig.mutex.xMutexEnd ){
16840 rc = sqlite3GlobalConfig.mutex.xMutexEnd();
16857 return sqlite3GlobalConfig.mutex.xMutexAlloc(id);
16861 if( !sqlite3GlobalConfig.bCoreMutex ){
16865 return sqlite3GlobalConfig.mutex.xMutexAlloc(id);
16873 sqlite3GlobalConfig.mutex.xMutexFree(p);
16883 sqlite3GlobalConfig.mutex.xMutexEnter(p);
16894 return sqlite3GlobalConfig.mutex.xMutexTry(p);
16907 sqlite3GlobalConfig.mutex.xMutexLeave(p);
16917 return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p);
16920 return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p);
18157 ** Pointers to the end of sqlite3GlobalConfig.pScratch memory
18254 if( sqlite3GlobalConfig.m.xMalloc==0 ){
18258 if( sqlite3GlobalConfig.bCoreMutex ){
18261 if( sqlite3GlobalConfig.pScratch && sqlite3GlobalConfig.szScratch>=100
18262 && sqlite3GlobalConfig.nScratch>0 ){
18265 sz = ROUNDDOWN8(sqlite3GlobalConfig.szScratch);
18266 sqlite3GlobalConfig.szScratch = sz;
18267 pSlot = (ScratchFreeslot*)sqlite3GlobalConfig.pScratch;
18268 n = sqlite3GlobalConfig.nScratch;
18279 sqlite3GlobalConfig.pScratch = 0;
18280 sqlite3GlobalConfig.szScratch = 0;
18281 sqlite3GlobalConfig.nScratch = 0;
18283 if( sqlite3GlobalConfig.pPage==0 || sqlite3GlobalConfig.szPage<512
18284 || sqlite3GlobalConfig.nPage<1 ){
18285 sqlite3GlobalConfig.pPage = 0;
18286 sqlite3GlobalConfig.szPage = 0;
18287 sqlite3GlobalConfig.nPage = 0;
18289 return sqlite3GlobalConfig.m.xInit(sqlite3GlobalConfig.m.pAppData);
18305 if( sqlite3GlobalConfig.m.xShutdown ){
18306 sqlite3GlobalConfig.m.xShutdown(sqlite3GlobalConfig.m.pAppData);
18362 nFull = sqlite3GlobalConfig.m.xRoundup(n);
18373 p = sqlite3GlobalConfig.m.xMalloc(nFull);
18377 p = sqlite3GlobalConfig.m.xMalloc(nFull);
18404 }else if( sqlite3GlobalConfig.bMemstat ){
18409 p = sqlite3GlobalConfig.m.xMalloc(n);
18451 if( mem0.nScratchFree && sqlite3GlobalConfig.szScratch>=n ){
18459 if( sqlite3GlobalConfig.bMemstat ){
18466 p = sqlite3GlobalConfig.m.xMalloc(n);
18496 if( p>=sqlite3GlobalConfig.pScratch && p<mem0.pScratchEnd ){
18504 assert( mem0.nScratchFree <= (u32)sqlite3GlobalConfig.nScratch );
18512 if( sqlite3GlobalConfig.bMemstat ){
18518 sqlite3GlobalConfig.m.xFree(p);
18521 sqlite3GlobalConfig.m.xFree(p);
18545 return sqlite3GlobalConfig.m.xSize(p);
18555 return sqlite3GlobalConfig.m.xSize(p);
18566 if( sqlite3GlobalConfig.bMemstat ){
18570 sqlite3GlobalConfig.m.xFree(p);
18573 sqlite3GlobalConfig.m.xFree(p);
18624 nNew = sqlite3GlobalConfig.m.xRoundup(nBytes);
18627 }else if( sqlite3GlobalConfig.bMemstat ){
18637 pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);
18640 pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);
18648 pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);
19858 sqlite3GlobalConfig.xLog(sqlite3GlobalConfig.pLogArg, iErrCode,
19867 if( sqlite3GlobalConfig.xLog ){
21675 testcase( sqlite3GlobalConfig.xLog!=0 );
21689 testcase( sqlite3GlobalConfig.xLog!=0 );
31961 ** sqlite3GlobalConfig.m with pointers to the routines in this file. The
35309 sqlite3GlobalConfig.pcache.xUnpin(pCache->pCache, p, 0);
35319 if( sqlite3GlobalConfig.pcache.xInit==0 ){
35325 return sqlite3GlobalConfig.pcache.xInit(sqlite3GlobalConfig.pcache.pArg);
35328 if( sqlite3GlobalConfig.pcache.xShutdown ){
35330 sqlite3GlobalConfig.pcache.xShutdown(sqlite3GlobalConfig.pcache.pArg);
35369 sqlite3GlobalConfig.pcache.xDestroy(pCache->pCache);
35399 p = sqlite3GlobalConfig.pcache.xCreate(nByte, pCache->bPurgeable);
35403 sqlite3GlobalConfig.pcache.xCachesize(p, pCache->nMax);
35409 pPage = sqlite3GlobalConfig.pcache.xFetch(pCache->pCache, pgno, eCreate);
35435 sqlite3GlobalConfig.pcache.xPagecount(pCache->pCache),
35444 pPage = sqlite3GlobalConfig.pcache.xFetch(pCache->pCache, pgno, 2);
35517 sqlite3GlobalConfig.pcache.xUnpin(pCache->pCache, p, 1);
35575 sqlite3GlobalConfig.pcache.xRekey(pCache->pCache, p, p->pgno, newPgno);
35612 sqlite3GlobalConfig.pcache.xTruncate(pCache->pCache, pgno+1);
35621 sqlite3GlobalConfig.pcache.xDestroy(pCache->pCache);
35733 nPage = sqlite3GlobalConfig.pcache.xPagecount(pCache->pCache);
35753 sqlite3GlobalConfig.pcache.xCachesize(pCache->pCache, mxPage);
36540 if( sqlite3GlobalConfig.bCoreMutex ){
36585 int separateCache = sqlite3GlobalConfig.bCoreMutex>0;
48330 sqlite3GlobalConfig.sharedCacheEnabled = enable;
50147 if( SQLITE_THREADSAFE && sqlite3GlobalConfig.bCoreMutex ){
64380 testcase( sqlite3GlobalConfig.xLog!=0 );
64383 testcase( sqlite3GlobalConfig.xLog!=0 );
69752 testcase( sqlite3GlobalConfig.xLog!=0 );
110268 if( sqlite3GlobalConfig.isInit ) return SQLITE_OK;
110289 sqlite3GlobalConfig.isMutexInit = 1;
110290 if( !sqlite3GlobalConfig.isMallocInit ){
110294 sqlite3GlobalConfig.isMallocInit = 1;
110295 if( !sqlite3GlobalConfig.pInitMutex ){
110296 sqlite3GlobalConfig.pInitMutex =
110298 if( sqlite3GlobalConfig.bCoreMutex && !sqlite3GlobalConfig.pInitMutex ){
110304 sqlite3GlobalConfig.nRefInitMutex++;
110328 sqlite3_mutex_enter(sqlite3GlobalConfig.pInitMutex);
110329 if( sqlite3GlobalConfig.isInit==0 && sqlite3GlobalConfig.inProgress==0 ){
110331 sqlite3GlobalConfig.inProgress = 1;
110334 if( sqlite3GlobalConfig.isPCacheInit==0 ){
110338 sqlite3GlobalConfig.isPCacheInit = 1;
110342 sqlite3PCacheBufferSetup( sqlite3GlobalConfig.pPage,
110343 sqlite3GlobalConfig.szPage, sqlite3GlobalConfig.nPage);
110344 sqlite3GlobalConfig.isInit = 1;
110346 sqlite3GlobalConfig.inProgress = 0;
110348 sqlite3_mutex_leave(sqlite3GlobalConfig.pInitMutex);
110354 sqlite3GlobalConfig.nRefInitMutex--;
110355 if( sqlite3GlobalConfig.nRefInitMutex<=0 ){
110356 assert( sqlite3GlobalConfig.nRefInitMutex==0 );
110357 sqlite3_mutex_free(sqlite3GlobalConfig.pInitMutex);
110358 sqlite3GlobalConfig.pInitMutex = 0;
110385 if( rc==SQLITE_OK && sqlite3GlobalConfig.isInit ){
110403 if( sqlite3GlobalConfig.isInit ){
110406 sqlite3GlobalConfig.isInit = 0;
110408 if( sqlite3GlobalConfig.isPCacheInit ){
110410 sqlite3GlobalConfig.isPCacheInit = 0;
110412 if( sqlite3GlobalConfig.isMallocInit ){
110414 sqlite3GlobalConfig.isMallocInit = 0;
110416 if( sqlite3GlobalConfig.isMutexInit ){
110418 sqlite3GlobalConfig.isMutexInit = 0;
110439 if( sqlite3GlobalConfig.isInit ) return SQLITE_MISUSE_BKPT;
110450 sqlite3GlobalConfig.bCoreMutex = 0;
110451 sqlite3GlobalConfig.bFullMutex = 0;
110457 sqlite3GlobalConfig.bCoreMutex = 1;
110458 sqlite3GlobalConfig.bFullMutex = 0;
110463 sqlite3GlobalConfig.bCoreMutex = 1;
110464 sqlite3GlobalConfig.bFullMutex = 1;
110469 sqlite3GlobalConfig.mutex = *va_arg(ap, sqlite3_mutex_methods*);
110474 *va_arg(ap, sqlite3_mutex_methods*) = sqlite3GlobalConfig.mutex;
110482 sqlite3GlobalConfig.m = *va_arg(ap, sqlite3_mem_methods*);
110487 if( sqlite3GlobalConfig.m.xMalloc==0 ) sqlite3MemSetDefault();
110488 *va_arg(ap, sqlite3_mem_methods*) = sqlite3GlobalConfig.m;
110493 sqlite3GlobalConfig.bMemstat = va_arg(ap, int);
110498 sqlite3GlobalConfig.pScratch = va_arg(ap, void*);
110499 sqlite3GlobalConfig.szScratch = va_arg(ap, int);
110500 sqlite3GlobalConfig.nScratch = va_arg(ap, int);
110505 sqlite3GlobalConfig.pPage = va_arg(ap, void*);
110506 sqlite3GlobalConfig.szPage = va_arg(ap, int);
110507 sqlite3GlobalConfig.nPage = va_arg(ap, int);
110513 sqlite3GlobalConfig.pcache = *va_arg(ap, sqlite3_pcache_methods*);
110518 if( sqlite3GlobalConfig.pcache.xInit==0 ){
110521 *va_arg(ap, sqlite3_pcache_methods*) = sqlite3GlobalConfig.pcache;
110528 sqlite3GlobalConfig.pHeap = va_arg(ap, void*);
110529 sqlite3GlobalConfig.nHeap = va_arg(ap, int);
110530 sqlite3GlobalConfig.mnReq = va_arg(ap, int);
110532 if( sqlite3GlobalConfig.mnReq<1 ){
110533 sqlite3GlobalConfig.mnReq = 1;
110534 }else if( sqlite3GlobalConfig.mnReq>(1<<12) ){
110536 sqlite3GlobalConfig.mnReq = (1<<12);
110539 if( sqlite3GlobalConfig.pHeap==0 ){
110545 memset(&sqlite3GlobalConfig.m, 0, sizeof(sqlite3GlobalConfig.m));
110552 sqlite3GlobalConfig.m = *sqlite3MemGetMemsys3();
110555 sqlite3GlobalConfig.m = *sqlite3MemGetMemsys5();
110563 sqlite3GlobalConfig.szLookaside = va_arg(ap, int);
110564 sqlite3GlobalConfig.nLookaside = va_arg(ap, int);
110575 ** sqlite3GlobalConfig.xLog = va_arg(ap, void(*)(void*,int,const char*));
110578 sqlite3GlobalConfig.xLog = va_arg(ap, LOGFUNC_t);
110579 sqlite3GlobalConfig.pLogArg = va_arg(ap, void*);
110584 sqlite3GlobalConfig.bOpenUri = va_arg(ap, int);
111988 if( ((flags & SQLITE_OPEN_URI) || sqlite3GlobalConfig.bOpenUri)
112218 if( sqlite3GlobalConfig.bCoreMutex==0 ){
112225 isThreadsafe = sqlite3GlobalConfig.bFullMutex;
112229 }else if( sqlite3GlobalConfig.sharedCacheEnabled ){
112417 setupLookaside(db, 0, sqlite3GlobalConfig.szLookaside,
112418 sqlite3GlobalConfig.nLookaside);
112425 assert( db->mutex!=0 || isThreadsafe==0 || sqlite3GlobalConfig.bFullMutex==0 );
112631 testcase( sqlite3GlobalConfig.xLog!=0 );
112638 testcase( sqlite3GlobalConfig.xLog!=0 );
112645 testcase( sqlite3GlobalConfig.xLog!=0 );
113067 sqlite3GlobalConfig.bLocaltimeFault = va_arg(ap, int);